hello, i'm making program which repeatedly (through while) gets input from the user ... program should stop whenever user enters "\n" (or enter button)!

thanks in advance!

hello, i'm making program which repeatedly (through while) gets input from the user ... program should stop whenever user enters "\n" (or enter button)!

thanks in advance!

If you mean exit the loop then use break...if you mean exit the program then use exit(EXIT_SUCCESS);

If you want to get fancy you could explore setjmp...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.