Please look at this code.
#include <iostream>
#include <string>
using namespace std;
int main() {
string hello = "Hello"
, world = "World";
const char *p = (hello+world).c_str();
cout << "STRING: " << p <<endl;
return 0;
}
I have no reputation, can't post images so that I will write results by hand.
= Visual Studio 2013 ver.12.0.30110.00
STRING:
= Dev-C++ ver.4.9.9.2
STRING: HelloWorld
The first following is execution result that compiled by Visual Studio.
Second is compiled by Dev-C++.
I wonder what makes this difference.
I will be looking forward to your reply. Thanks :)