Learning, need help with endless loop and quit
Write your question here.
I was wondering how I could put my program into an endless while loop and have it quit when the user enters "quit".
Thanks!
1 2 3 4 5 6 7 8 9 10
|
#include <iostream>
#include <string>
int main()
{
std::string command;
while(std::cin >> command && command != "quit")
{
}
}
|
Topic archived. No new replies allowed.