So here i got a small test program:Software i used for test:Compiler: gcc 7.3.0Compiler flags: -std=c++11
Consider the following piece of code:I compiled this program using g++ (Ubuntu 6.5.0-1ubuntu1~16.04) 6.5.0 20181026:
You are first displaying the reverse string, then outputting Your reverse name is. But the string is never reversed. Use:
Is it guaranteed by the standard that std::string will not give back allocated memory spontaneously if re-sized to a smaller size?
Justin's answer on another question made an observation that I find very interesting but can't quite explain. Consider the following code:
Can i design my logging-function in a way, that it accepts concatenated strings of the following form using C++?