Question advanced C++ devs

Can I use a “+” instead of << like i did in this screenshot.

I learnt how to program in java and this is normally how we would have done it. we would have a + instead of a << where i have mine. Thanks for the help.

Realistically there probably isn’t a difference and the compiler most likely optimise it away if there is. However, doing

"your guess is..." + guess

would construct a new std::string and then would push that to cout.

I would recommend you stick to convention. coding conventions are pushed heavily by the developers and generally by the community when it comes to Unreal Engine. This is because it is designed to develop for a very wide variety of platforms and non-conventional coding can cause problems all over the place when it comes to putting your game together.

Privacy & Terms