Hey I need a simple program which only asks name and age, by filing. And tell me, too, how'd execute that program. Please help me out asap...
you need to create a new project in your favorite IDE
first lines of code :
1 2
|
#include <iostream>
using namespace std;
|
create the main function
1 2 3 4
|
int main()
{
return 0;
}
|
add in the main function 2 char arrays
1 2
|
char name[10];
char age[2];
|
get user to insert name
cin>>name;
get user to insert age
cin>>age;
pause the program
Last edited on
Thank you so much but It wouldn't save the previous data that I'd input. I guess it'd be only done by file(stream) tell me that.