How do i get cin to read all the words i type. Here's the code so far, this doesnt work right:
Some of the commands that are typed into the console are like:
command var1 var2
But as the code is now, only the first word that i type is passed to the 'doCommand'. doCommand doesn't like this, it likes to have its arguments. As u can see, i tried the noskipws manipulator, but it didnt do nuthing. Thanx in advance!
Code:
std::string input;
bool bQuit;
bool r;
void main(){
bQuit = 0;
r = console.openLogFile();
console.logMessage("Engine startup");
while (bQuit == 0){
std::cin>>std::noskipws;
std::cin>>input;
console.doCommand(input.c_str());
}
console.logMessage("Engine shutdown");
}
void quit(){
bQuit = 1;
}
Some of the commands that are typed into the console are like:
command var1 var2
But as the code is now, only the first word that i type is passed to the 'doCommand'. doCommand doesn't like this, it likes to have its arguments. As u can see, i tried the noskipws manipulator, but it didnt do nuthing. Thanx in advance!