Hallo zusammen. Ich möchte jetzt in einem c++ programm einen, bzw. mehrere strings MIT leerzeichen einlesen. Mit cin >> xyz geht es ja definitiv nicht. mit getline(cin, xyz) soll es ja wohl gehen. doch habe ich da folgendes problem: die eingabe für die variable, also die mit getline aufgerufen wird WIRD EINFACH ÜBERSPRUNGEN!!!
Hier der Code. Bitte helft mir danke schonmal
cout << "Welcome to C++ Filecompiler using G++ !\nThis app is proudly presented by Armin Linzbauer, Copyright 2012." << endl;
cout << "\nFirst, this app is going to collect some basic information...\n(Write paths ALWAYS in quotationmarks!!!\n" << endl;
cout << "\nName of source file, type 0 for standard (\"main.cpp\") -" << "\nName: ";
cin >> sourceName;
cout << "Source path (must end with a slash), type 0 for standard (this directory) -" << "\nPath: ";
getline(cin, sourcePath);
//cin >> sourcePath;
cout << "Name target file here, type 0 for standard (\"app\") -" << "\nName: ";
cin >> targetName;
cout << "Target path (must end with a slash), type 0 for standard (this directory) -" << "\nPath: ";
getline(cin, targetPath);
//cin >> targetPath;
cout << sourceName << "; " << sourcePath << "; " << targetName << "; " << targetPath << endl;
cout << matchedSource << endl;
cout << matchedTarget[1] << endl;
cout << matchedTarget[0] << endl;
cout << matchedSrcTgt << endl;
sorry für die < und >... ich weiß net wie ich die wegbekomme hier im editor!