witam mam problem z pewna funkcja a mianowicie po odpaleniu wysakuja mi błedy:
C:\Users\glon\Desktop\proooba\code\devik\laptop.h|16|error: variable or field zmien' declared void| C:\Users\glon\Desktop\proooba\code\devik\laptop.h|16|error: expected
;' before '(' token|
== Build finished: 2 errors, 0 warnings ===
oto kod
#include <iostream>
#include "komputer.h"
#include "smartfon.h"
#include "laptop.h"
using namespace std;
using namespace std;
int main()
{
cout<<"komputer PC marki dell: "<<endl;
komputer dell;
dell.zapamietaj(3,4);
dell.wypisz();
cout<<endl;
cout<<"komputer PC marki acer: "<<endl;
komputer acer;
acer.zapamietaj(3,5);
acer.wypisz();
cout<<endl;
cout<<"Porownanie: "<<endl;
porownaj_procesory(dell, acer);
porownaj_ramy(dell, acer);
cout<<endl;
cout<<"Smartfon marki Nokia: "<<endl;
smartfon nokia;
nokia.zapamietaj(92,3,88,44);
nokia.wypisz();
cout<<endl;
cout<<"Smartfonik marki Ericson: "<<endl;
smartfon ericson;
ericson.zapamietaj(23,3,7,44);
ericson.wypisz();
cout<<endl;
//porownaj//
porownaj_procesory(nokia, ericson);
porownaj_ramy(nokia, ericson);
cout<<endl;
//porownaj//
laptop lg;
lg.zapamietaj(2,4,5,6);
lg.wypisz();
////
cout<<endl;
cout<<"po zmianie: "<<endl;
lg.zmien(nokia,104);
nokia.wypisz();
system( "PAUSE" );
return 0;
}
i laptop.h
#include <iostream>
#ifndef laptop_h
#define laptop_h
class laptop : public komputer
{
int karta_sim;
int numer_telefonu;
int bateria;
public:
//wpisz x//
void zmien(smartfon & nokia, int z)
{
nokia.bateria=z;
};
//wpisz//
laptop(){ }
void zamknij_pokrywe();
void wypisz();
void zapamietaj(int procesor, int ram,int karta_sim, int bateria);
virtual void uruchom();
};
#endif
Proszę o pomoc, chodzi glownie oto aby funcja zmien zamieniala wartosc baterii w nokii