std::cout << "Hello guys";

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Ender

HQ Setup Specialist
Supreme
Feedback score
2
Posts
263
Reactions
43
Resources
0
string understanding;

std::cout << "what is up? I have just joined this community";

std::cin >> understanding;

if (understanding = "what is up? I have just joined this community") {

std::cout << "Welcome to the community!";

} else {

std::cout << "Do I know you?";

}[DOUBLEPOST=1557974179][/DOUBLEPOST]A little wrrong but you get the point... lol took to much effort
 
Last edited:

Because2

Deactivated
Feedback score
0
Posts
6
Reactions
2
Resources
0
Looks like you know more than me when it comes to C++ ;) Welcome to MCM!

That's an expression, not an operator but nice try


That one is a statement, not an expression. and i pointed the "cout" which is an abbreivation of character output stream.
nice try tho ^

Expression here is only the string literal, which is string of characters more precisely.[DOUBLEPOST=1558018393][/DOUBLEPOST]
string understanding;



std::cin >> understanding;

if (understanding = "what is up? I have just joined this community") {

std::cout << "Welcome to the community!";

} else {

std::cout << "Do I know you?";

}[DOUBLEPOST=1557974179][/DOUBLEPOST]A little wrrong but you get the point... lol took to much effort


nice hehe, you only have to change the = assignment operator to ==
 
Last edited:

iiEcho

A motivated developer.
Premium
Feedback score
1
Posts
96
Reactions
32
Resources
0
string understanding;



std::cin >> understanding;

if (understanding = "what is up? I have just joined this community") {

std::cout << "Welcome to the community!";

} else {

std::cout << "Do I know you?";

}[DOUBLEPOST=1557974179][/DOUBLEPOST]A little wrrong but you get the point... lol took to much effort
Try to find the mistake here ;)
Edit: wait it has already been said nvm haha
 
Status
This thread has been locked.
Top