I have a project in Code::Blocks to practice my SDL. For some reason something as simple as this:
is causing a segfault for me. I don't ever recall having an issue where declaring a string caused this.
I generated an all new console project to test this:
using namespace std;
std::string helloworld = "hello world";
cout << helloworld << endl;
This has the same issue. Am I just missing something obvious?
As Aardvajk pointed out it is your installation. You need to install Code::Blocks again. Also as pointed out if you are doing 'using namespace std;' you don't need 'using std::string;' and you don't need 'std::' on the line definition of helloworld.
Yeah, I worked it out in the site chat with SotL that my installation was messed up somehow. Still no idea why. Didn't do anything different on the second install.