I'm using GNU GCC compiler in Code::Blocks on Windows. Why doesn't sleep(seconds) work here? I've tried it using library and it works fine. Thanks.
Edit: By "doesn't work" I mean, doesn't compile. Sorry.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[]){
char * c = (char *) malloc(sizeof(char)*50);
if(--argc>0){
printf("POTATO: \n");
while(argc>=1){
printf("- %s\n", argv[argc]);
sleep(10);
argc--;
}
printf("\n");
}
printf("A\n");
scanf("%s", c);
printf("What you wrote: %s\n", c);
scanf("%s", c);
return 0;
}