Alrighty so its telling me I'm missing a terminating " character. Its saying its an issue with the "Ah yes" line. I have no idea. All my other lines that are similar go through just fine. this is only a piece out of a work in progress. anyone see the error? I've been staring at this screen way too long hahah XD! Hope someone can figure it out for me because I'm blank lol. Thanks!
1 2 3 4 5 6 7 8 9 10 11 12 13
std::cin >> name;
std::cout << "Ah yes " + name; std::cout << "... Then I am surely not mistaken. Are you sure you dont know who I
am?" << std::endl;
std::cin >> yes;
if(no == 1) {
std::cout << "You Lose!" << endl; return 0;
}else{
std::cout << "Well good, then that settles things. Shall we get started?" << std::endl;
}
@Stormboy; HAHHAHAHAHA I fail so hard. How did I not try that. I need to go to bed and stop looking at all this damn code lol. Its screwing with my head man! Well thanks a lot. I appreciate it. I knew it was something I was terribly overlooking. Thanks!
@Stormboy; Actually, that didn't work. I have no clue why either. In my head that makes logical sense. Oh well I'm sure ill figure it out tomorrow if someone doesn't figure it out while I'm sleeping. Thanks for trying to help though, I appreciate it!
Now that is some weird error you are having there Bleh101. I don't see anything wrong with your code. Is it in any other part of your code? Can you post your full code?
Strings don't link over lines. If you want a string to continue onto the next line, you either have to seperate it and output two strings, add a backslash at the end to escape the linefeed, or seperate it and concantenate two strings. Here is examples of all three ways:
1 2 3 4 5 6 7 8
std::cout << "long, long string "
<< "continued on next line\n";
std::cout << "long, long string \
continued on next line\n";
std::cout << "long, long string ""continued on next line\n";
@NT3; Its the same way for the rest of my dialogue in my code and it works perfectly fine. This line is the one that throws me off. When I take out this line, it builds just fine but whatever is wrong with this line is throwing me for a whirl.
@Stormboy; Ill post a little more of it after I tinker with it a bit tonight after work.
On top of that, I've narrowed it down to what it is. Its somewhere between: