You can simply add using namespace std;
before main
to make this work.
Note: this may cause problems in some situations. Here it’s OK.
Moreover, you’re using a wrong header. Use <iostream>
instead of <stdio.h>
.
This will work
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int age1;
int age2;
cout<<"Enter Age of First Kid";
cin >> age1;
cout<<"Enter Age of Second Kid";
cin>>age2;
return 0; // it's better to inform the system everything's OK
}
0
solved Unable to assign a value