Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


What Is This Error?

Annika BrockAnnika Brock Member Posts: 2

I'm taking the online course CS50 currently, and as I have basically no experience with programming I feel kind of at a loss. Currently I am supposed to be writing a code that will validate a credit card number; most of my code is error-free, but I keep getting something like this when I try to compile:

credit.c:17:18: error: 'GetLongLong' is deprecated [-Werror,-Wdeprecated-declarations]
cardnumber = GetLongLong();
/usr/include/cs50.h:198:11: note: 'GetLongLong' has been explicitly marked deprecated here
long long GetLongLong(void) attribute((deprecated));
1 error generated.
make: *** [credit] Error 1

I have tried to see what's wrong, tried to change the name of the variable, and have looked at posts by others in the class, but they all seem to be having different problems. As far as I know GetLongLong() is included in the set of things Harvard provided for us, and get_long_long results in another error saying something about invalid pointer to integer conversion??

Here is the specific piece of problem code:

long long cardnumber = 0; //ensures card number will be read

printf("Number:"); //prompts for card number
cardnumber = GetLongLong();
while (cardnumber < 0);

Help please!

Sign In or Register to comment.