I am trying to print a formatted string in C++ in netbeans :
#include <iostream>
#include <string>
using namespace std;
int main() {
string name = "mark";
cout << "My name is " << name << " years old.";
return 0;
}
but I get the error:
RUN FAILED (exit value -1,073,741,511, total time: 37ms)
why is this?