I want to exit while loop as soon as user presses enter in C++
I want user to press enter to get out of while loop
#include <iostream>
#include <conio.h>
int main()
{
while(//What Condition should I give??)
{
cout << "Hello wolrd";
//I want to keep this in loop until the user press enter
}
}
Aucun commentaire:
Enregistrer un commentaire