So somehow I cant use the get_long_long(); function. It lets me declare the variable, but I cant get any user input for it.

Here's my code:

#include <stdio.h>
#include <cs50.h>
#include <math.h>

int main(void)
//Promt user to input a CC number
long long cc_n = get_long_long();
printf("%lld\n", cc_n);

And I always get this error message:

test.c:8:22: error: implicit declaration of function 'get_long_long' is invalid in C99 [-Werror,-Wimplicit-function-declaration] long long cc_n = get_long_long();

Can't get it to work even though I included cs50.h, which help50 tells me to do!


Does cs50.h have a function called get_long_long?. There is no function by that name listed in the CS50 Reference. And notice this from the spec:

Now, get_long itself will reject hyphens (and more) anyway:

It looks like get_long_long has been deprecated in the 2019 version of the course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .