Unapred hvala!
Code:
#include<iostream>
#include<string>
using namespace std;
class Podaci{
public:
void unesiPodatke(string a, string b, int c)
{
ime = a;
prezime = b;
godiste = c;
}
void pokaziPodatke()
{
cout << "\n Ime: " << ime;
cout << "\n Prezime: " << prezime;
cout << "\n Godiste: " << godiste;
}
private:
string ime;
string prezime;
int godiste;
};
int main()
{
Podaci prvi;
prvi.unesiPodatke("Pera", "Peric", 1234);
prvi.pokaziPodatke;
system("pause");
return 0;
}
#include<iostream>
#include<string>
using namespace std;
class Podaci{
public:
void unesiPodatke(string a, string b, int c)
{
ime = a;
prezime = b;
godiste = c;
}
void pokaziPodatke()
{
cout << "\n Ime: " << ime;
cout << "\n Prezime: " << prezime;
cout << "\n Godiste: " << godiste;
}
private:
string ime;
string prezime;
int godiste;
};
int main()
{
Podaci prvi;
prvi.unesiPodatke("Pera", "Peric", 1234);
prvi.pokaziPodatke;
system("pause");
return 0;
}