Super nooby question

Sep 1, 2014 at 9:01am
I'm needing for it to read as
"blank"
"blank"
"blank" by Blank"

but it will only let me compile to show
"blank"
"blank"
'blank' by Blank"

???
(I changed the fields to "blank" when I posted this question)

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

using namespace std;

int main()
{
    cout << "blank" << endl;
    cout << "blank" <<endl;
    cout << "'blank' by Blank";
    return 0;
}



1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

using namespace std;

int main()
{
    cout << "blank" << endl;
    cout << "blank" <<endl;
    cout << ""blank" by Blank";
    return 0;
}
Last edited on Sep 1, 2014 at 9:03am
Sep 1, 2014 at 9:04am
you cannot put quotation within the quotation it will become an undeclared variable ^^ hope you did not notice the color ^^
Sep 1, 2014 at 9:16am
You need to escape your quotation marks
 
cout << "\"blank\" by Blank";

Last edited on Sep 1, 2014 at 9:16am
Sep 1, 2014 at 9:23am
thanks, that's all I needed
Topic archived. No new replies allowed.