Alexander1231
@Alexander1231
2
I am working on an online C course. I am currently working on lectures introducing stacks. However in this lecture I am told to include #include howe
6
I am working on an online C course. I am currently working on lectures introducing stacks. However in this lecture I am told to include #include howe
mwilki7 conio.h is a windows header, won't compile on repl.it while they use linux OS's
same for the system("cls") command
The linux equivalent would be printing a special character that clears the console screen:
printf("\033[H\033[J");
if you wanted to put that in a define:
#define clearScreen() printf("\033[H\033[J")
`2 years ago
4
When I try to use the gets() function in C. I always get a warning "gets is invalid in C99"
Does anyone know why this is happening? Also how to fix t
C
mwilki7 from what I'm getting from
https://stackoverflow.com/questions/49256131/why-is-implicit-declaration-of-gets-not-allowed-in-c99
gets was removed from the standard library and this error message was a notification for those with this in their legacy code to remove it
so it depends how old the compiler you're using is
you should use fscanf(file pointer, format string, argument1, argument2...) as a substitute
Example:
#include
int main()
{
int test_input = 0;
printf("Test input: ");
2 years ago