Message from C, C++ discussions

January 2020

— ..

— 

Hi.

while (getline(std::cin, line)) {
myfile << line << "\n";
}

i wanted to know how can i stop getting input and continue the flow of the program after while statement?

— You need to create a condition to break the loop.

— Like if the user presses enter or stops typing for a certain length of time.

— If you are trying for a word processor usually you switch between taking input from the event queue and performing other tasks.

Message permanent page

— Nope!
Hell not at all!

— Something like:
if(line.size() == 0)
break;

— That would break the loop when pressed enter without typing anthimg.

— Guys I have a test of C. So i wanted to learn it from scratch so do you guys have any video or YouTube link.

Message permanent page

— Google learn C programming and find the 5 hour course on youtube

— Hi I started to approach the programming mode recently and I'm starting to have some problems so I thought to write to you hoping for your help. I state that I am on windows and I have installed Dev-C ++ (to program in C ++) but I have not understood how to install a new library. I searched on google but found nothing.

Message permanent page

— Https://stackoverflow.com/questions/1069602/how-do-i-install-a-c-library-so-i-can-use-it