c++ input edit task,help

Hi i need to make program but dont know how i am using wxDev-c++ and i need to make.

Tasks would include:
use a class or struct variable, and create a program that can perform the following actions:
1. The data provided by the user to enter the keyboard.
2. The display of the stored data.
3. edit the data.

Example of data:
name surname age.

I Try like it,its let me input and save it but how to edit it or i am doing it bad?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include<iostream>
#include<fstream>
using namespace std;

int main()

{

            char name[50], sur[50];
            int a;

            ofstream outfile("C:\\info.txt");

            cout << "Name:";
            cin >> name;
            outfile << "Name:" << name << endl;
            
             cout << "Sur:";
            cin >> sur;
            outfile << "sur:" << sur << endl;

            cout << "Age:";
            cin >> a;
            outfile << "Age:" << a << endl;

            outfile.close();

            return(0);

}
Last edited on
Any more help,not just links? i am very bad in c++ but i need to make for the college
well, you need to know struct / class first. otherwise you wont understand.
so can you help me to do it? or just make a bit for the beginning?
if you have any problem in understanding class you can post.
Topic archived. No new replies allowed.