cout problems...

Posts 16–21 of 21 · Page 2 of 2
Quote Originally Posted by Auxilium View Post


Maybe you made a mistake with your else if
I'll check that later, for now I'm gonna go get some dinner...
Did you mean:
getchar();
or
cin.get();
or
system("PAUSE");

that the program not exit after executing your code ?


Regards
Quote Originally Posted by inmate View Post
Did you mean:
getchar();
or
cin.get();
or
system("PAUSE");

that the program not exit after executing your code ?


Regards
EDIT
FIXED IT
int main()
{
cout << "put the text in here and have endl; -.-" << endl;
cout << "endl; makes it move to the next line which is here" << endl;
cout << "then finish up with return 0; when ur done" << endl;
return 0;
}
Code:
cout << "thats the first word that came to your mind? weird...\n"<< endl;
    system("cls");
here you cout something and instantly delete it...
maybe at sleep to it?

Code:
getline (cin,ITSASTRING);                 // getting the input from this line and inputting it into ITSASTRING 
        stringstream(ITSASTRING) >> firstname;    // transferring data from ITSASTRING to firstname
why not get it directly? it saves you code and 1 less variable
Code:
getline (cin,firstname);
Quote Originally Posted by Toxic Waltz View Post
Code:
cout << "thats the first word that came to your mind? weird...\n"<< endl;
    system("cls");
here you cout something and instantly delete it...
maybe at sleep to it?

Code:
getline (cin,ITSASTRING);                 // getting the input from this line and inputting it into ITSASTRING 
        stringstream(ITSASTRING) >> firstname;    // transferring data from ITSASTRING to firstname
why not get it directly? it saves you code and 1 less variable
Code:
getline (cin,firstname);
I got it working fine, and for somereason getline (cin,firstname) doesn't work for me... it skips again.
Posts 16–21 of 21 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us