Lately I have been trying to store strings in variables. I did quite a few searches online, and most of the answers that I have found recommend the use of std::string. So I've written a test program that looks like this:
#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
getline(cin,s);
cout << s;
}
The program compiles fine, however, when I run the program I revieve this error:`Error Message
I am a huge beginner to programming and confused on what is going on. Can anyone please give me some insight on what is happening here? Thanks!
Also, I am using the GCC compiler.
EDIT: I have successfully solved the issue. All I did was reinstall GCC using a tutorial on the web. I do not know what was wrong, but it is fixed now.