powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / C++ [игнор отключен] [закрыт для гостей] / Ошибка компиляции
11 сообщений из 11, страница 1 из 1
Ошибка компиляции
    #38613734
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здравствуйте, поправьте пожалуйста код кому не сложно
компитяор dev c++ 4.9.9.2

Код: plaintext
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.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
#include "iostream"
#include <stdio.h>
 
using namespace std;
 
class Auto
{
      /*&#238;&#239;&#232;&#241;&#224;&#237;&#232;&#229; &#253;&#235;&#229;&#236;&#229;&#237;&#242;&#238;&#226; &#234;&#235;&#224;&#241;&#241;&#224; &#192;&#226;&#242;&#238;*/
private:
        char Marka[50];
        char Cvet[50];
        char Model[50];
        char Tip_topliva[50]; 
        int Rashod;  
        int Max_Speed;
        int Dalnost_peremechenia;
        int Kolichestvo_passagirov;
        int Ves_gruza_kg;
public:
       Auto(void);
       void Input(void);
       void Print(void);
};
 
class Samolet
{
      private:
        char Model[50];
        char Tip_topliva[50]; 
        int Rashod;
        int Max_Speed;
        int Dalnost_peremechenia;
        int Kolichestvo_chlenov_ekipaga;
        int Kolichestvo_dvigateley;
        int Kolichestvo_passagirov;
        int Ves_gruza_t;
public:
       Samolet(void);
       void Input(void);
       void Print(void);
};
 
class Korabl
{
      private:
        char Model[50];
        char Tip_topliva[50]; 
        int Rashod;
        int Max_Speed;
        int Dalnost_peremechenia;
        int Kolichestvo_chlenov_ekipaga;
        int Kolichestvo_dvigateley;
        int Kolichestvo_passagirov;
        int Ves_gruza_t;
public:
       Korabl(void);
       void Input(void);
       void Print(void);
};
 
 
Auto::Auto(void)  :   Rashod(0),  Max_Speed(0),  Dalnost_peremechenia(0),  Kolichestvo_passagirov(0),  Ves_gruza_kg(0)
{
                          Marka[0] = 0;
                          Cvet[0] = 0;
                          Model[0] = 0;
                          Tip_topliva[0] = 0;
                          
}
void Auto::Input(void)
{
     cout << "Please, input Auto info\nAuto\t| Marka: ";
     cin >> Marka;
     cout << "\t| Cvet:  ";
     cin >> Cvet;
     cout << "\t| Model:  ";
     cin >> Model;
     cout << "\t| Tip_topliva: ";
     cin >> Tip_topliva;
     cout << "\t| Rashod: ";
     cin >> Rashod;
     cout << "\t| Max_Speed:  ";
     cin >> Max_Speed;
     cout << "\t| Dalnost_peremechenia:  ";
     cin >> Dalnost_peremechenia;
     cout << "\t| Kolichestvo_passagirov:  ";
     cin >> Kolichestvo_passagirov;
     cout << "\t| Ves_gruza_kg:  ";
     cin >> Ves_gruza_kg;
}
 
void Auto::Print(void)
{
     cout << "\nAuto\t| Marka:  " << Marka
     << "\n\t| Cvet: " << Cvet
     << "\n\t| Model:  " << Model
     << "\n\t| Tip_topliva: " << Tip_topliva
     << "\n\t| Rashod: " << Rashod
     << "\n\t| Max_Speed: " << Max_Speed
     << "\n\t| Dalnost_peremechenia: " << Dalnost_peremechenia
     << "\n\t| Kolichestvo_passagirov: " << Kolichestvo_passagirov
     << "\n\t| Ves_gruza_kg: " << Ves_gruza_kg
     <<"\n" ;
}
 
Samolet::Samolet(void) :  Rashod(0),  Max_Speed(0),  Dalnost_peremechenia(0),  Kolichestvo_passagirov(0),  Ves_gruza_t(0), Kolichestvo_chlenov_ekipaga (0), Kolichestvo_dvigateley (0), Kolichestvo_passagirov (0)
{
                   Model[0] = 0;
                   Tip_topliva[0] = 0;
}
 
void Samolet::Input(void)
{
     cout << "Please, input Samolet info\nSamolet\t| Model: ";
     cin >> Model;
     cout << "\t| Tip_topliva: ";
     cin >> Tip_topliva;
     cout << "\t| Rashod: ";
     cin >> Rashod;
     cout << "\t| Max_Speed:  ";
     cin >> Max_Speed;
     cout << "\t| Dalnost_peremechenia:  ";
     cin >> Dalnost_peremechenia;
     cout << "\t| Kolichestvo_passagirov:  ";
     cin >> Kolichestvo_passagirov;
     cout << "\t| Ves_gruza_t:  ";
     cin >> Ves_gruza_t;
     cout << "\t| Kolichestvo_chlenov_ekipaga:  ";
     cin >> Kolichestvo_chlenov_ekipaga;
     cout << "\t| Kolichestvo_dvigateley:  ";
     cin >> Kolichestvo_dvigateley;
     
}
 
void Samolet::Print(void)
{
      cout << "\nSamolet\t| Model:  " << Model
     << "\n\t| Tip_topliva: " << Tip_topliva
     << "\n\t| Rashod: " << Rashod
     << "\n\t| Max_Speed: " << Max_Speed
     << "\n\t| Dalnost_peremechenia: " << Dalnost_peremechenia
     << "\n\t| Kolichestvo_passagirov: " << Kolichestvo_passagirov
     << "\n\t| Ves_gruza_t: " << Ves_gruza_t
      << "\n\t| Kolichestvo_chlenov_ekipaga:  " <<Kolichestvo_chlenov_ekipaga
      << "\n\t| Kolichestvo_dvigateley:  " << Kolichestvo_dvigateley
     <<"\n" ;
}
 
Korabl::Korabl(void)  : Rashod(0),  Max_Speed(0),  Dalnost_peremechenia(0),  Kolichestvo_passagirov(0),  Ves_gruza_t(0), Kolichestvo_chlenov_ekipaga(0), Kolichestvo_dvigateley(0), Kolichestvo_passagirov(0),
{
        Model[0] = 0;
        Tip_topliva[0] = 0;
}
 
void Korabl::Input(void)
{
     cout << "Please, input Korabl info\nKorabl\t| Model: ";
     cin >> Model;
     cout << "\t| Tip_topliva: ";
     cin >> Tip_topliva;
     cout << "\t| Rashod: ";
     cin >> Rashod;
     cout << "\t| Max_Speed:  ";
     cin >> Max_Speed;
     cout << "\t| Dalnost_peremechenia:  ";
     cin >> Dalnost_peremechenia;
     cout << "\t| Kolichestvo_passagirov:  ";
     cin >> Kolichestvo_passagirov;
     cout << "\t| Ves_gruza_t:  ";
     cin >> Ves_gruza_t;
     cout << "\t| Kolichestvo_chlenov_ekipaga:  ";
     cin >> Kolichestvo_chlenov_ekipaga;
     cout << "\t| Kolichestvo_dvigateley:  ";
     cin >> Kolichestvo_dvigateley;
     
}
 
void Korabl::Print(void)
{
      cout << "\nSamolet\t| Model:  " << Model
     << "\n\t| Tip_topliva: " << Tip_topliva
     << "\n\t| Rashod: " << Rashod
     << "\n\t| Max_Speed: " << Max_Speed
     << "\n\t| Dalnost_peremechenia: " << Dalnost_peremechenia
     << "\n\t| Kolichestvo_passagirov: " << Kolichestvo_passagirov
     << "\n\t| Ves_gruza_t: " << Ves_gruza_t
      << "\n\t| Kolichestvo_chlenov_ekipaga:  " <<Kolichestvo_chlenov_ekipaga
      << "\n\t| Kolichestvo_dvigateley:  " << Kolichestvo_dvigateley
     <<"\n" ;
}

 
int main (void)
{
    setlocale(LC_ALL,"RUS");
      Auto a;
      a.Input();
      a.Print();
 
      cout << endl;
 
      Samolet s;
      s.Input();
      s.Print();
 
      cout << endl;
 
      Korabl k;
      k.Input();
      k.Print();
 
      cout << endl;
      
      int z;
      cin >> z;
}



Журнал компиляции:
Êîìïèëÿòîð: Default compiler
Âûïîëíåíèå g++.exe...
g++.exe "C:\Users\Performance\Desktop\LA1.cpp" -o "C:\Users\Performance\Desktop\LA1.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Users\Performance\Desktop\LA1.cpp: In constructor `Samolet::Samolet()':
C:\Users\Performance\Desktop\LA1.cpp:107: error: multiple initializations given for `Samolet::Kolichestvo_passagirov'

C:\Users\Performance\Desktop\LA1.cpp: In constructor `Korabl::Korabl()':
C:\Users\Performance\Desktop\LA1.cpp:150: error: expected identifier before '{' token

C:\Users\Performance\Desktop\LA1.cpp:150: error: expected `(' before '{' token

C:\Users\Performance\Desktop\LA1.cpp:150: error: multiple initializations given for `Korabl::Kolichestvo_passagirov'
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613739
Dimitry Sibiryakov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Копи-паст - зло. Англо-русский словарь - рулез.

C:\Users\Performance\Desktop\LA1.cpp: In constructor `Samolet::Samolet()':
C:\Users\Performance\Desktop\LA1.cpp:107: error: multiple initializations given for
`Samolet::Kolichestvo_passagirov'

Пересчитай на пальцах сколько раз ты поставил туда Kolichestvo_passagirov.

C:\Users\Performance\Desktop\LA1.cpp: In constructor `Korabl::Korabl()':
C:\Users\Performance\Desktop\LA1.cpp:150: error: expected identifier before '{' token

Запятую ты поставл, а следующий член списка - где?..

C:\Users\Performance\Desktop\LA1.cpp:150: error: multiple initializations given for
`Korabl::Kolichestvo_passagirov'

Ещё раз используй пальцы.
Posted via ActualForum NNTP Server 1.5
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613745
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
спасибо, исправил все работает))

а еще одну программу проверите?
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613757
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Код: plaintext
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.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
#include "iostream"
#include <string.h>

using namespace std;

class Base     // bazovyy class soderzhit vse obschie
{              // polya i methody
protected:
          char Naimenovanie[50];
          char Areal_obitania[50];
          int Temperatura_sodergania;
          int Vlagnost;
          int Vrema_life;
          int Reproduktivniy_vozrast;
          
public:
       Base(void);                    // constructor
       virtual void Input(void) = 0;  // method vvoda
       virtual void Print(void) = 0;  // method vyvoda

       /* opisanie drugih methodov, naprimer: */
           virtual int Type(void) = 0;    // tip objecta (Cat=1, Dog=2)
           int GetVlagnost(void);            // uznat' Vlagnost
           int LessThan(Base * p);             // sravnit' nicki (menshe chem)
};

Base::Base(void)  : Temperatura_sodergania(0), Vlagnost(0), Vrema_life(0), Reproduktivniy_vozrast(0)
{
                   Naimenovanie[0] = 0;
                   Areal_obitania[0] = 0;
}
int Base::GetVlagnost(void)
{
    return Temperatura_sodergania, Vlagnost(0), Vrema_life, Reproduktivniy_vozrast;
}

int Base::LessThan(Base*p)
{
    return strcmp(Naimenovanie, p->Naimenovanie) < 0;
}

class Ratenia : public Base
{
      
private:
        char Sposob_razmnogenia[50];
        char Nalichie_plodov[5]; /*&#228;&#224; &#232;&#235;&#232; &#237;&#229;&#242;*/
public:
       Rastenia(void);
       void Input(void);
       void Print(void);
       int Type(void) {return 1; }
};

class Ribi : public Base
{
private:
        char Tip_vodi[20];
public:
       Ribi(void);
       void Input(void);
       void Print(void);
       int Type(void) { return 2; }
};

Rastenia::Rastenia(void);
{
       Sposob_razmnogenia[0] = 0;
       Nalichie_plodov[0] = 0;
}

void Rastenia::Input(void)
{
     cout << "Please, input Rastenie info\nRastenie\t| Naimenovanie: ";
     cin >> Naimenovanie;
     cout << "\t| Areal_obitania:  ";
     cin >> Areal_obitania;
     cout << "\t| Sposob_razmnogenia:  ";
     cin >> Sposob_razmnogenia;
     cout << "\t| Nalichie_plodov: ";
     cin >> Nalichie_plodov;
     cout << "\t| Tip_rastenia: ";
     cin >> Tip_rastenia;
     cout << "\t| Temperatura_sodergania:  ";
     cin >> Temperatura_sodergania;
     cout << "\t| Vlagnost:  ";
     cin >> Vlagnost;
     cout << "\t| Vrema_life:  ";
     cin >> Vrema_life;
     cout << "\t| Reproduktivniy_vozrast:  ";
     cin >> Reproduktivniy_vozrast;
}

void Rastenia::Print(void);
{
     cout << "\nRastenie\t| Naimenovanie:  " << Naimenovanie
     << "\n\t| Areal_obitania: " << Areal_obitania
     << "\n\t| Sposob_razmnogenia:  " << Sposob_razmnogenia
     << "\n\t| Nalichie_plodov: " << Nalichie_plodov
     << "\n\t| Tip_rastenia: " << Tip_rastenia
     << "\n\t| Temperatura_sodergania: " << Temperatura_sodergania
     << "\n\t| Vlagnost: " << Vlagnost
     << "\n\t| Vrema_life: " << Vrema_life
     << "\n\t| Reproduktivniy_vozrast: " << Reproduktivniy_vozrast
     <<"\n" ;
}

Ribi::Ribi(void) : 
{
                 Tip_vodi[0] = 0;
}

void Ribi::Input(void)
{
      cout << "Please, input Ribi info\nRibi\t| Naimenovanie: ";
     cin >> Naimenovanie;
     cout << "\t| Areal_obitania:  ";
     cin >> Areal_obitania;
     cout << "\t| Tip_vodi:  ";
     cin >> Tip_vodi;
     cout << "\t| Temperatura_sodergania:  ";
     cin >> Temperatura_sodergania;
     cout << "\t| Vlagnost:  ";
     cin >> Vlagnost;
     cout << "\t| Vrema_life:  ";
     cin >> Vrema_life;
     cout << "\t| Reproduktivniy_vozrast:  ";
     cin >> Reproduktivniy_vozrast;
}

void Ribi::Print(void)
{
      cout << "\nRastenie\t| Naimenovanie:  " << Naimenovanie
     << "\n\t| Areal_obitania: " << Areal_obitania
     << "\n\t| Tip_vodi:  " << Tip_vodi
     << "\n\t| Temperatura_sodergania: " << Temperatura_sodergania
     << "\n\t| Vlagnost: " << Vlagnost
     << "\n\t| Vrema_life: " << Vrema_life
     << "\n\t| Reproduktivniy_vozrast: " << Reproduktivniy_vozrast
     <<"\n";
}

void Sort (Base * A[], int N)
{
int i, j;
Base * p;

  for (i = N-1; i > 0; i--)
    for (j = 0; j < i; j++)
      if (A[i]->LessThan(A[j]))       // sravnenie objectov pri
      {                               // pomoschi metoda
        p = A[i];
        A[i] = A[j];
        A[j] = p;
      }
}

void Filter(Base * A[], int N)        // vyvod po priznaku
{
int i, j;

  cout << "Vvedite vlagnost: ";
  cin >> j;
    for (i = 0; i < N; i++)
      if (A[i]->GetVlagnost() == j)
      A[i]->Print();
}

void FilterType(Base * A[], int N, int tip) // vyvod po tipu
{
int i, j;

  for (i = 0; i < N; i++)
    if (A[i]->Type() == tip)          // proverka tipa
      A[i]->Print();
}

int main(void)
{
Base * A[20];
int N =0;

char key, key2;
Base * p;
int i, j;

   do
   {
       cout << "\n\n  1 dobavit'\n  2 udalit'\n  3 pechatat'\n"
            "  4 iskat'\n  5 sortirovat'\n  0 vyhod\n>>";
    cin >> key;

    switch (key)            // proverka nazhatoy klavishi
    {
      case '1':         // dobavlenie
        if (N >= 20)
        {
          cout << "net mesta!\n";
          break;
        }
        
        cout << "Dobavit':\n  1 Rastenie\n  2 Ribu\n>>";
        cin >> key2;
        if (key2 == '1')
          p = new Rastenie;      // sozdaem object Rastenie
        else
          if (key2 == '2')
            p = new Riba;    // sozdaem object Riba
          else
          {
            cout << "nepravilno nazhali!\n";
            break;          // i vyhodim
          }

           if (p)              // yesly object sozdalsa, to
        {
          p->Input();       // vyzyvaem vvod objecta s klaviatury
          A[N] = p;         // zanosim ego v massiv
          N++;              // uvelichivaem kolichestvo objectov
        }
        else
          cout << "pamyaty ne hvataet!\n";
        break;
        
        case '2':         // udalenie
        cout << "Udalit':\nvvedite nomer ot 0 do " << N-1 << ": ";
        cin >> i;
        if (i < 0 || i >= N)
          cout << "nepravilnyy nomer!\n";
        else
        {
          delete A[i];          // unichtozhaem element
          for (; i < N-1; i++)  // sdvigaem ostalnye chtob
            A[i] = A[i+1];      //   v massive nebylo "dyrki"
          N--;                  // umenshaem kolichestvo objectov
        }
        break;
        
        case '3':         // prosmotr
        if (!N)                   // yesli net objectov - soobschaem
          cout << "Prosmotr: net objectov!\n";
        else
          for (i = 0; i < N; i++) // dlya vseh objectov
            A[i]->Print();        // vyzyvaem method vyvoda
        break;
        
        case '4':         // poisk
        cout << "Poisk:\n  1 vse Rastenia\n  2 vse Ribi\n  3 po Naimenovanie\n>>";
        cin >> key2;
        if (key2 == '1')
          FilterType(A, N, 1);  // vyvod vseh Rastenii
        else
        if (key2 == '2')
          FilterType(A, N, 2);  // vyvod vseh Rib
        else
        if (key2 == '3')
          Filter(A, N);         // filtraciya po priznaku
        else
          cout << "nepravilno nazhali!\n";
        break;
        
        case '5':         // sortirovka
        Sort(A, N);
        break;

      case '0':         // vyhod
        break;
        
         default:
        cout << "nepravilno nazhali!\n";
        break;
    }
  }
  while (key != '0'); // rabotaem poka ne nazhat 0

  for (i = 0; i < N; i++)   // unichtozhaem vse objecty
    delete A[i];

  cout << "Poka!\n";
}



Журнал
Êîìïèëÿòîð: Default compiler
Âûïîëíåíèå g++.exe...
g++.exe "C:\Users\Performance\Desktop\LS2.cpp" -o "C:\Users\Performance\Desktop\LS2.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Users\Performance\Desktop\LS2.cpp: In member function `int Base::GetVlagnost()':
C:\Users\Performance\Desktop\LS2.cpp:34: error: `((Base*)this)->Base::Vlagnost' cannot be used as a function

C:\Users\Performance\Desktop\LS2.cpp: At global scope:
C:\Users\Performance\Desktop\LS2.cpp:49: error: ISO C++ forbids declaration of `Rastenia' with no type

C:\Users\Performance\Desktop\LS2.cpp:66: error: `Rastenia' has not been declared
C:\Users\Performance\Desktop\LS2.cpp:66: error: expected constructor, destructor, or type conversion before ';' token
C:\Users\Performance\Desktop\LS2.cpp:67: error: expected unqualified-id before '{' token
C:\Users\Performance\Desktop\LS2.cpp:67: error: expected `,' or `;' before '{' token
C:\Users\Performance\Desktop\LS2.cpp:72: error: `Rastenia' has not been declared

C:\Users\Performance\Desktop\LS2.cpp: In function `void Input()':
C:\Users\Performance\Desktop\LS2.cpp:75: error: `Naimenovanie' undeclared (first use this function)
C:\Users\Performance\Desktop\LS2.cpp:75: error: (Each undeclared identifier is reported only once for each function it appears in.)

C:\Users\Performance\Desktop\LS2.cpp:77: error: `Areal_obitania' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:79: error: `Sposob_razmnogenia' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:81: error: `Nalichie_plodov' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:83: error: `Tip_rastenia' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:85: error: `Temperatura_sodergania' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:87: error: `Vlagnost' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:89: error: `Vrema_life' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp:91: error: `Reproduktivniy_vozrast' undeclared (first use this function)

C:\Users\Performance\Desktop\LS2.cpp: At global scope:
C:\Users\Performance\Desktop\LS2.cpp:94: error: `Rastenia' has not been declared

C:\Users\Performance\Desktop\LS2.cpp:95: error: expected unqualified-id before '{' token
C:\Users\Performance\Desktop\LS2.cpp:95: error: expected `,' or `;' before '{' token

C:\Users\Performance\Desktop\LS2.cpp: In constructor `Ribi::Ribi()':
C:\Users\Performance\Desktop\LS2.cpp:109: error: expected identifier before '{' token
C:\Users\Performance\Desktop\LS2.cpp:109: error: expected `(' before '{' token

C:\Users\Performance\Desktop\LS2.cpp: In function `int main()':
C:\Users\Performance\Desktop\LS2.cpp:205: error: `Rastenie' has not been declared
C:\Users\Performance\Desktop\LS2.cpp:208: error: `Riba' has not been declared
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613768
Dimitry Sibiryakov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Я же говорил, что англо-русский словарь рулит. Какое слово из сообщений об ошибках тебе
непонятно?
Posted via ActualForum NNTP Server 1.5
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613772
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
я если честно немецкий изучал, поэтому туговато будет сидеть со словарем
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613789
Dimitry Sibiryakov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
kot07туговато будет сидеть со словарем
Зато полезно на всю оставшуюся жизнь.
Posted via ActualForum NNTP Server 1.5
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38613885
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Dimitry Sibiryakovkot07туговато будет сидеть со словарем
Зато полезно на всю оставшуюся жизнь.


это вы верно подметили :)
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38614491
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
подскажите пожалуйста еще разок что не так, просто насколько понимаю из словаря где переменная не того типа

Код: plaintext
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.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
#include "iostream"
#include <string.h>

using namespace std;

class Base     // bazovyy class soderzhit vse obschie
{              // polya i methody
protected:
          char  Model[50];
          char Tip_topliva[50];
          int Ves_gruza_kg;
          int Rashod;  
          int Max_Speed;
          int Dalnost_peremechenia;
          int Max_kolichestvo_passagirov;
           int Max_visota;
          
public:
       Base(void);                    // constructor
       virtual void Input(void) = 0;  // method vvoda
       virtual void Print(void) = 0;  // method vyvoda

       /* opisanie drugih methodov, naprimer: */
           virtual int Type(void) = 0;    // tip objecta (Cat=1, Dog=2)
           int GetMax_Speed(void);            // uznat' Vlagnost
           int LessThan(Base * p);          // sravnit' nicki (menshe chem)
           char Marka[50];
           char Cvet[50];  
                 
};

Base::Base(void)  : Rashod(0), Max_Speed(0), Dalnost_peremechenia(0), Max_kolichestvo_passagirov(0)
{
                   Model[0] = 0;
                   Tip_topliva[0] = 0;
}
int Base::GetMax_Speed(void)
{
    return Rashod, Max_Speed, Dalnost_peremechenia, Max_kolichestvo_passagirov;
}

int Base::LessThan(Base*p)
{
    return Max_kolichestvo_passagirov<(p->Max_kolichestvo_passagirov);
}

class Auto : public Base
{
      
private:
        char Marka[50];
        char Cvet[50]; /*&#228;&#224; &#232;&#235;&#232; &#237;&#229;&#242;*/
public:
       Auto(void);
       void Input(void);
       void Print(void);
       int Type(void) {return 1; }
};

class Samolet : public Base
{
private:
        int Kolichestvo_chlenov_ekipaga[20];
        int Max_visota[10];
        int Kolichestvo_dvigateley[10];
public:
       Samolet(void);
       void Input(void);
       void Print(void);
       int Type(void) { return 2; }
};

Auto::Auto(void)
{
       Marka[0] = 0;
       Cvet[0] = 0;
       
}

void Auto::Input(void)
{
     cout << "Please, input Auto info\nAuto\t| Marka: ";
     cin >> Marka;
     cout << "\t| Cvet:  ";
     cin >> Cvet;
     cout << "\t| Model:  ";
     cin >> Model;
     cout << "\t| Tip_topliva: ";
     cin >> Tip_topliva;
     cout << "\t| Rashod: ";
     cin >> Rashod;
     cout << "\t| Max_Speed:  ";
     cin >> Max_Speed;
     cout << "\t| Dalnost_peremechenia:  ";
     cin >> Dalnost_peremechenia;
     cout << "\t| Max_kolichestvo_passagirov:  ";
     cin >> Max_kolichestvo_passagirov;
     cout << "\t| Ves_gruza_kg:  ";
     cin >> Ves_gruza_kg;
}

void Auto::Print(void)
{
     cout << "\nAuto\t| Marka:  " << Marka
     << "\n\t| Cvet: " << Cvet
     << "\n\t| Model:  " << Model
     << "\n\t| Tip_topliva: " << Tip_topliva
     << "\n\t| Rashod: " << Rashod
     << "\n\t| Max_Speed: " << Max_Speed
     << "\n\t| Dalnost_peremechenia: " << Dalnost_peremechenia
     << "\n\t| Max_kolichestvo_passagirov: " << Max_kolichestvo_passagirov
     << "\n\t| Ves_gruza_kg: " << Ves_gruza_kg
     <<"\n" ;
}

Samolet::Samolet(void)
{
                Model[0] = 0;
                Tip_topliva[0] = 0;
                
}

void Samolet::Input(void)
{
     cout << "Please, input Samolet info\nSamolet\t| Model: ";
     cin >> Model;
     cout << "\t| Tip_topliva: ";
     cin >> Tip_topliva;
     cout << "\t| Rashod: ";
     cin >> Rashod;
     cout << "\t| Max_Speed:  ";
     cin >> Max_Speed;
     cout << "\t| Max_visota:   ";
     cin >> Max_visota;
     cout << "\t| Dalnost_peremechenia:  ";
     cin >> Dalnost_peremechenia;
     cout << "\t| Max_kolichestvo_passagirov:  ";
     cin >> Max_kolichestvo_passagirov;
     cout << "\t| Ves_gruza_t:  ";
     cin >> Ves_gruza_t;
     cout << "\t| Kolichestvo_chlenov_ekipaga:  ";
     cin >> Kolichestvo_chlenov_ekipaga;
     cout << "\t| Kolichestvo_dvigateley:  ";
     cin >> Kolichestvo_dvigateley;
     
}

void Samolet::Print(void)
{
      cout << "\nSamolet\t| Model:  " << Model
     << "\n\t| Tip_topliva: " << Tip_topliva
     << "\n\t| Rashod: " << Rashod
     << "\n\t| Max_Speed: " << Max_Speed
     << "\n\t| Max_visota: " << Max_visota
     << "\n\t| Dalnost_peremechenia: " << Dalnost_peremechenia
     << "\n\t| Max_kolichestvo_passagirov: " << Max_kolichestvo_passagirov
     << "\n\t| Ves_gruza_t: " << Ves_gruza_t
      << "\n\t| Kolichestvo_chlenov_ekipaga:  " <<Kolichestvo_chlenov_ekipaga
      << "\n\t| Kolichestvo_dvigateley:  " << Kolichestvo_dvigateley
     <<"\n" ;
}

void Sort (Base * A[], int N)
{
int i, j;
Base * p;

  for (i = N-1; i > 0; i--)
    for (j = 0; j < i; j++)
      if (A[i]->LessThan(A[j]))       // sravnenie objectov pri
      {                               // pomoschi metoda
        p = A[i];
        A[i] = A[j];
        A[j] = p;
      }
}

void Filter(Base * A[], int N)        // vyvod po priznaku
{
int i, j;

  cout << "Vvedite Max_Speed: ";
  cin >> j;
    for (i = 0; i < N; i++)
      if (A[i]->GetMax_Speed() == j)
      A[i]->Print();
}

void FilterType(Base * A[], int N, int tip) // vyvod po tipu
{
int i, j;

  for (i = 0; i < N; i++)
    if (A[i]->Type() == tip)          // proverka tipa
      A[i]->Print();
}

int main(void)
{
Base * A[20];
int N =0;

char key, key2;
Base * p;
int i, j;

   do
   {
       cout << "\n\n  1 dobavit'\n  2 udalit'\n  3 pechatat'\n"
            "  4 iskat'\n  5 sortirovat'\n  0 vyhod\n>>";
    cin >> key;

    switch (key)            // proverka nazhatoy klavishi
    {
      case '1':         // dobavlenie
        if (N >= 20)
        {
          cout << "net mesta!\n";
          break;
        }
        
        cout << "Dobavit':\n  1 Auto\n  2 Samolet\n>>";
        cin >> key2;
        if (key2 == '1')
          p = new Auto;      // sozdaem object Rastenie
        else
          if (key2 == '2')
            p = new Samolet;    // sozdaem object Riba
          else
          {
            cout << "nepravilno nazhali!\n";
            break;          // i vyhodim
          }

           if (p)              // yesly object sozdalsa, to
        {
          p->Input();       // vyzyvaem vvod objecta s klaviatury
          A[N] = p;         // zanosim ego v massiv
          N++;              // uvelichivaem kolichestvo objectov
        }
        else
          cout << "pamyaty ne hvataet!\n";
        break;
        
        case '2':         // udalenie
        cout << "Udalit':\nvvedite nomer ot 0 do " << N-1 << ": ";
        cin >> i;
        if (i < 0 || i >= N)
          cout << "nepravilnyy nomer!\n";
        else
        {
          delete A[i];          // unichtozhaem element
          for (; i < N-1; i++)  // sdvigaem ostalnye chtob
            A[i] = A[i+1];      //   v massive nebylo "dyrki"
          N--;                  // umenshaem kolichestvo objectov
        }
        break;
        
        case '3':         // prosmotr
        if (!N)                   // yesli net objectov - soobschaem
          cout << "Prosmotr: net objectov!\n";
        else
          for (i = 0; i < N; i++) // dlya vseh objectov
            A[i]->Print();        // vyzyvaem method vyvoda
        break;
        
        case '4':         // poisk
        cout << "Poisk:\n  1 vse Auto\n  2 vse Samolet\n  3 po Max_Speed\n>>";
        cin >> key2;
        if (key2 == '1')
          FilterType(A, N, 1);  // vyvod vseh Rastenii
        else
        if (key2 == '2')
          FilterType(A, N, 2);  // vyvod vseh Rib
        else
        if (key2 == '3')
          Filter(A, N);         // filtraciya po priznaku
        else
          cout << "nepravilno nazhali!\n";
        break;
        
        case '5':         // sortirovka
        Sort(A, N);
        break;

      case '0':         // vyhod
        break;
        
         default:
        cout << "nepravilno nazhali!\n";
        break;
    }
  }
  while (key != '0'); // rabotaem poka ne nazhat 0

  for (i = 0; i < N; i++)   // unichtozhaem vse objecty
    delete A[i];

  cout << "Poka!\n";
}



Журнал
Êîìïèëÿòîð: Default compiler
Âûïîëíåíèå g++.exe...
g++.exe "C:\Users\Performance\Desktop\LA2.cpp" -o "C:\Users\Performance\Desktop\LA2.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Users\Performance\Desktop\LA2.cpp: In member function `virtual void Samolet::Input()':
C:\Users\Performance\Desktop\LA2.cpp:134: error: no match for 'operator>>' in 'std::cin >> ((Samolet*)this)->Samolet::Max_visota'
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:87: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>&(*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:93: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:102: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base&(*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:111: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:133: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:164: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:186: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:217: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:239: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:261: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:284: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:306: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:329: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits<char>]

C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:351: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:373: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:395: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:417: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:646: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:651: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:687: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:692: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*) [with _Traits = std::char_traits<char>]
C:\Users\Performance\Desktop\LA2.cpp:140: error: `Ves_gruza_t' undeclared (first use this function)

C:\Users\Performance\Desktop\LA2.cpp:140: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:\Users\Performance\Desktop\LA2.cpp:142: error: no match for 'operator>>' in 'std::cin >> ((Samolet*)this)->Samolet::Kolichestvo_chlenov_ekipaga'
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:87: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>&(*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:93: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:102: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base&(*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:111: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits<char>]

C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:133: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:164: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:186: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:217: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:239: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:261: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:284: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:306: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:329: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:351: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:373: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:395: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:417: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:646: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:651: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:687: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:692: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*) [with _Traits = std::char_traits<char>]
C:\Users\Performance\Desktop\LA2.cpp:144: error: no match for 'operator>>' in 'std::cin >> ((Samolet*)this)->Samolet::Kolichestvo_dvigateley'
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:87: note: candidates are: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>&(*)(std::basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:93: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:102: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base&(*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:111: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:133: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:164: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:186: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:217: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:239: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:261: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:284: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits<char>]

C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:306: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:329: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:351: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:373: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits<char>]

C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:395: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/bits/istream.tcc:417: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:646: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:651: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:687: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*) [with _Traits = std::char_traits<char>]
C:/Dev-Cpp/include/c++/3.4.2/istream:692: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*) [with _Traits = std::char_traits<char>]
C:\Users\Performance\Desktop\LA2.cpp: In member function `virtual void Samolet::Print()':
C:\Users\Performance\Desktop\LA2.cpp:158: error: `Ves_gruza_t' undeclared (first use this function)


Модератор: портянки надо прятать в тэг spoiler
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38614589
White Owl
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
kot07подскажите пожалуйста еще разок что не так, просто насколько понимаю из словаря где переменная не того типаПравильно понимаешь.
...
Рейтинг: 0 / 0
Ошибка компиляции
    #38614696
kot07
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а можете подсказать где и на какой тип ее поменять?
...
Рейтинг: 0 / 0
11 сообщений из 11, страница 1 из 1
Форумы / C++ [игнор отключен] [закрыт для гостей] / Ошибка компиляции
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]