The correct code should look like:
#include <iostream>
#include <string>
using namespace std;
struct dude {
string name;
int age;
};
int main() {
struct dude about;
about.name = "jason";
about.age = 4000;
cout << about.name << " " << about.age << endl;
return 0;
}
EDIT: Added the necessary includes so that it compiles. Also, as a best practise, moved type definition outside of function.