Modernes C++ programmieren

Okt 20, 2024

lst-0027-godb.cpp

//#(execute) c++; compiler:g132; options:-O3 -std=c++23; libs:-
// https://godbolt.org/z/6hh5KhExM 
#include <iostream>                // cin
#include <string>
int main() {
    std::string line;
    do {                             // execute getline at least once
       std::getline(std::cin, line);
       if(!std::cin) break;          // error or end of file
    } while(line != "quit");         // end on specific input
}