Написал задание с классами, по примеру, но в public выдает ошибки, незнаю как их переделать :)

!!!Archi!!!

# include "stdafx.h"
# include <conio.h>
#include <iostream>
#include <string.h>
 
using namespace std;
class Magazine
 
{
    
    private:
    char name [255];    
    char  Kolvo_Tovar [255];
    char Kolvo_Client [255];
    char Adres [233];
    char telefon [25];
    public:
   Magazine();
    ~Magazine ();
    void Input ();
    void Output ();
void  search_Client ();
 void search_Tovar (); 
 void save_Client ();
 void load_Client ();
void save_Tovar ();
 void load_tovar ();
 void add_Client ();
 void add_Tovar();
 void del_Client();
 void del_Tovar();
 
}
class Tovar
{
    private:
    char name_tovara [255];
    int cena_za_edinicy;
    char data_Prodazhi [100];
    char vid_sporta [100];
    int kod_tovara;
  char proizvod [255];
    int kolvo_tovara_na_sclade;
    public:
          Tovar (); 
   ~Tovar (); 
   void  Input (); 
void Output (); 
void set_Data_name_tovara(in name_tovara :int);
 void set_Data_cena_za_edinicy(in cena_za_edinicy :int);
 void set_Data_data_prodagi(in data_prodagi :int);
 void set_Data_vid_sporta(in vid_sporta :int);
 void set_Data_cod_tovara(in  cod_tovara:int);
 void get_Data_name_tovara();
 char get_Data_cena_za_edinicy();
 char get_Data_data_prodagi();
 char get_Data_vid_sporta();
 char gett_cod_tovara();
} 
class Client
{
private:
    char name_klienta [255];
    int data_pokupci;
    int Kol_vo_Kuplennogo_tovara;
    int discontnai_carta;
    char tel_clienta [255];
public:
    
  Client();
    ~Client ();
   void  Input (); 
void Output (); 
void set_Data_Name_Clienta(in Name:int); 
void  set_Data_pocypci(in Data :int); 
void  set_Data_Kol_kyp_tov(in Kol_kyp_tov :int); 
void set_Data_discontnai_carta(in discontnai_carta :int); 
void set_Data_tel_clienta(in tel_clienta :int); 
char get_Data_Name_Clienta(); 
 int get_Data_Data_pocypci(); 
 int get_Data_Kolichestvo_kyplennogo_tovara(); 
int get_Data_discontnai_carta(); 
 char get_Data_tel_clienta(); 
 
}
Magazine::Magazine()
{
    strcpy (name," ");
    strcpy (Adres," ");
    strcpy (Adres," ");
    strcpy(Kolvo_Tovar, " ");
    strcpy(telefon, " ");
   
}
 
Magazine::~Magazine() {}
 
void Magazine::Input()
{
    cout<<"Bvedite Nazvanie magazina: ";
    cin>>name;
    cout<<"Bvedite Adres ";
    cin>>Adres;
     cout<<"Bvedite telefon: ";
    cin>>telefon;
cout<<"Bvedite kolichestvo clienta: ";
    cin>>Kolvo_Client;
    cout<<"Bvedite kolichestvo clienta: ";
   cin>>Kolvo_Tovar;
}
void Magazine::Output()
{
    cout<<endl<<endl<<name<<" "<<Adres<<" "<<telefon<<" "<<Kolvo_Client<<" "<<Kolvo_Client<<" ";
}
Tovar::Tovar()
{
    strcpy(name_tovara," ");
    cena_za_edinicy=0;
    strcpy(data_Prodazhi, " ");   
     strcpy(vid_sporta, " ");
     kod_tovara=0;
      strcpy(proizvod, " ");
    kolvo_tovara_na_sclade=0;
}
Tovar::~Tovar() {}
 
void Tovar::Input()
{
    cout<<"Bvedite nazvanie tovara: ";
    cin>>name_tovara ;
    cout<<"Bvedite ceny tovara: ";
    cin>>cena_za_edinicy;
    cout<<"Bvedite daty prodazhi tovara: ";
    cin>>data_Prodazhi;
    cout<<"Bvedite vid sporta: ";
    cin>>vid_sporta;
    cout<<"Bvedite kod tovara: ";
    cin>>kod_tovara;
    cout<<"Bvedite proizvoditelia: ";
    cin>>proizvod;
    cout<<"Bvedite kol-vo tovara ne sklade: ";
    cin>>kolvo_tovara_na_sclade;
    
}
 
void Tovar::Output()
{
cout <<endl<<endl<<name_tovara<<" "<<cena_za_edinicy<<" "<<data_Prodazhi<<" "<<vid_sporta<<" "<<kod_tovara<<" "<<proizvod<<" "<<kolvo_tovara_na_sclade;
}
Client::Client()
{
    strcpy (name_klienta," ");
    data_pokupci=0;
    Kol_vo_Kuplennogo_tovara=0;
    discontnai_carta=0;
    strcpy (tel_clienta," ");
}
Client::~Client () {}
 
void Client::Input()
{
    cout<<"Bvedite imia clienta: ";
    cin>>name_klienta;
    cout<<"Bvedite daty pocupki: ";
    cin>>data_pokupci;
    cout<<"Bvedite kolichestvo kyplennogo tovara: ";
    cin>>Kol_vo_Kuplennogo_tovara;
    cout<<"Bvedite discontnuy cartu: ";
    cin>>discontnai_carta;
    cout<<"Bvedite telefon clienta: ";
    cin>>tel_clienta;
}
void Client:: Output()
{
    cout <<endl<<endl<<name_klienta<<data_pokupci<<Kol_vo_Kuplennogo_tovara<<discontnai_carta<<tel_clienta;
}
    int main ()
{
    Magazine Magazine;
   Tovar Tovar;
   Client Client;
    Magazine.Input ();
    Tovar.Input ();
    Client.Input ();
     Magazine.Output ();
Tovar. Output ();
Client.Output ();
       getch();  
    cin.get ();
    cin.get ();
    
    return 0;
}
1 ответ

!!!Archi!!!

 void set_Data_name_tovara(in name_tovara :int);
 void set_Data_cena_za_edinicy(in cena_za_edinicy :int);
 void set_Data_data_prodagi(in data_prodagi :int);
 void set_Data_vid_sporta(in vid_sporta :int);
 void set_Data_cod_tovara(in  cod_tovara:int);
Это не С++. Может так?
#include <iostream>
#include <string.h>
 
using namespace std;
class Magazine {
        
    private:
        char name [255];        
    char  Kolvo_Tovar [255];
    char Kolvo_Client [255];
        char Adres [233];
        char telefon [25];
    public:
   Magazine();
    ~Magazine ();
    void Input ();
    void Output ();
void  search_Client ();
 void search_Tovar (); 
 void save_Client ();
 void load_Client ();
void save_Tovar ();
 void load_tovar ();
 void add_Client ();
 void add_Tovar();
 void del_Client();
 void del_Tovar();
 
};
 
class Tovar
{
    private:
    char name_tovara [255];
    int cena_za_edinicy;
        char data_Prodazhi [100];
        char vid_sporta [100];
        int kod_tovara;
  char proizvod [255];
        int kolvo_tovara_na_sclade;
    public:
                  Tovar (); 
   ~Tovar (); 
   void  Input (); 
 void Output (); 
 void set_Data_name_tovara(int name_tovara);
 void set_Data_cena_za_edinicy(int cena_za_edinicy);
 void set_Data_data_prodagi(int data_prodagi);
 void set_Data_vid_sporta(int vid_sporta);
 void set_Data_cod_tovara(int  cod_tovara);
 void get_Data_name_tovara();
 char get_Data_cena_za_edinicy();
 char get_Data_data_prodagi();
 char get_Data_vid_sporta();
 char gett_cod_tovara();
};
 
class Client
{
private:
        char name_klienta [255];
        int data_pokupci;
        int Kol_vo_Kuplennogo_tovara;
        int discontnai_carta;
        char tel_clienta [255];
public:
        
  Client();
    ~Client ();
   void  Input (); 
void Output (); 
void set_Data_Name_Clienta(int Name); 
void  set_Data_pocypci(int Data); 
void  set_Data_Kol_kyp_tov(int Kol_kyp_tov); 
void set_Data_discontnai_carta(int discontnai_carta); 
void set_Data_tel_clienta(int tel_clienta); 
char get_Data_Name_Clienta(); 
 int get_Data_Data_pocypci(); 
 int get_Data_Kolichestvo_kyplennogo_tovara(); 
int get_Data_discontnai_carta(); 
 char get_Data_tel_clienta(); 
 
};
 
Magazine::Magazine()
{
        strcpy (name," ");
        strcpy (Adres," ");
        strcpy (Adres," ");
    strcpy(Kolvo_Tovar, " ");
    strcpy(telefon, " ");
   
}
 
Magazine::~Magazine() {}
 
void Magazine::Input()
{
    cout<<"Bvedite Nazvanie magazina: ";
    cin>>name;
        cout<<"Bvedite Adres ";
    cin>>Adres;
         cout<<"Bvedite telefon: ";
        cin>>telefon;
cout<<"Bvedite kolichestvo clienta: ";
    cin>>Kolvo_Client;
        cout<<"Bvedite kolichestvo clienta: ";
   cin>>Kolvo_Tovar;
}
void Magazine::Output()
{
    cout<<endl<<endl<<name<<" "<<Adres<<" "<<telefon<<" "<<Kolvo_Client<<" "<<Kolvo_Client<<" ";
}
Tovar::Tovar()
{
    strcpy(name_tovara," ");
    cena_za_edinicy=0;
        strcpy(data_Prodazhi, " ");   
         strcpy(vid_sporta, " ");
         kod_tovara=0;
          strcpy(proizvod, " ");
        kolvo_tovara_na_sclade=0;
}
Tovar::~Tovar() {}
 
void Tovar::Input()
{
    cout<<"Bvedite nazvanie tovara: ";
    cin>>name_tovara ;
    cout<<"Bvedite ceny tovara: ";
    cin>>cena_za_edinicy;
    cout<<"Bvedite daty prodazhi tovara: ";
    cin>>data_Prodazhi;
        cout<<"Bvedite vid sporta: ";
        cin>>vid_sporta;
        cout<<"Bvedite kod tovara: ";
        cin>>kod_tovara;
        cout<<"Bvedite proizvoditelia: ";
        cin>>proizvod;
        cout<<"Bvedite kol-vo tovara ne sklade: ";
        cin>>kolvo_tovara_na_sclade;
        
}
 
void Tovar::Output()
{
cout <<endl<<endl<<name_tovara<<" "<<cena_za_edinicy<<" "<<data_Prodazhi<<" "<<vid_sporta<<" "<<kod_tovara<<" "<<proizvod<<" "<<kolvo_tovara_na_sclade;
}
Client::Client()
{
        strcpy (name_klienta," ");
        data_pokupci=0;
        Kol_vo_Kuplennogo_tovara=0;
        discontnai_carta=0;
        strcpy (tel_clienta," ");
}
Client::~Client () {}
 
void Client::Input()
{
        cout<<"Bvedite imia clienta: ";
        cin>>name_klienta;
        cout<<"Bvedite daty pocupki: ";
        cin>>data_pokupci;
        cout<<"Bvedite kolichestvo kyplennogo tovara: ";
        cin>>Kol_vo_Kuplennogo_tovara;
        cout<<"Bvedite discontnuy cartu: ";
        cin>>discontnai_carta;
        cout<<"Bvedite telefon clienta: ";
        cin>>tel_clienta;
}
void Client:: Output()
{
        cout <<endl<<endl<<name_klienta<<data_pokupci<<Kol_vo_Kuplennogo_tovara<<discontnai_carta<<tel_clienta;
}
        int main ()
{
    Magazine Magazine;
   Tovar Tovar;
   Client Client;
    Magazine.Input ();
    Tovar.Input ();
        Client.Input ();
         Magazine.Output ();
Tovar. Output ();
Client.Output ();
    cin.get ();
    cin.get ();
        
    return 0;
}