class code

Hello guys i have to do a code with a class of 3 different fields of any data type,(class Person or Building or Car)and 2 constructors(one default and one with the parameters which are spanish huge names)after that program should ask the user the file to open,program opens the file with the name provided in read mode and in a loop till the file ends,and creat the subsequent value of the class and then add those values to a table,printing them using tables then program asks user if he wants to change them or add new object.then output file in write mode
one line per object

#include "stdafx.h"
#include <iostream>
using namespace std;

class person {
char fName , mName, Iname ;
public:
Person();
Person(fName,mName,Iname);
}person ;

~person(){
delete person(fName,mName,iname);
}

person::Person(){
fName= "Jaime";
mName= "Fernandes";
Iname= "Molian";
}
person::Person(char fn ,char mn, char ln){
fName= fn;
mName = mn;
iName = ln;
}

void main()
{


this is my code till now any suggestions?
The syntax is wrong. You probably need to read a tutorial on C++ Classes to get a feel for what a class is, how to define one and how to use one.
1
2
3
4
5
6
7
8
9
10
class person {              // class Person
char fName , mName, Iname ; // string fName, mName, iName;
public:
Person();
Person(fName,mName,Iname);  // Person(string f, string m, string i);
}person ;                   // ??? this doesn't belong here, and don't declare variables like this anyway

~person(){                  // Bad syntax and unnecessary method
delete person(fName,mName,iname);
}

Topic archived. No new replies allowed.