Pomyśl także o umieszczeniu większości tekstów w osobnych plikach - to odchudzi w dużym stopniu Twój kod i uczyni go łatwiejszym w czytaniu.
Przykład.
#include <iostream>
#include <fstream>
using namespace std;
struct get{ string _name; };
ostream& operator<<( ostream& out , const get& file )
{
ifstream text {file._name};
if( !text ) out << "Error ..." << endl;
else
{
string line;
while( getline( text , line ) ) out << line << endl;
}
return out;
}
int main()
{
int c {-1};
while( c != 0 ) // dla c == 0 kończymy program
{
cout << get{"menu.txt"};
cout << "Wybierz interesujacy Cie temat" << endl;
cin >> c;
// ..... switch
}
}
https://wandbox.org/permlink/LT4xpWgXEMXqKoZC