Here is my problem...
I want the user to be able to press enter and then the line of text to repeate
But... this does not work, that is my code basically. Or that is what i tried rather, I also tried "\r" but that didnt work and neither did EOF. N E ideas?Code:#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char lol[20]; while(1) { printf("command: "); scanf("%s", lol); if(strcmp(lol, "\n") == 0) { // reprint "command" } } }



LinkBack URL
About LinkBacks


