Dear Code::Block community,
I using Code::Block 16.02 at my work, and 17.12 at my house.
and I am writing C++ programs, and I am creating a Code Block Project (.cbp) and using the debugger (GDP) to debug the program.
Alot of the times when I am using the string class, I get a segmentation error when debugging, it happens so random and so frequent.
I know the reason for that is because GDP debuggers have a problem with strings, but what is the solution, how can I remove the segmentation error.
Edit1this is the code that caused Segmentation Error
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
string s1("Hi how are you");
for(int i = 0;i<s1.size();i++)
cout<<s1.at(i)<<endl;
return 0;
}