Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by bartek ( 17 years ago )
#include <iostream>
#include <string>
using namespace std;
class Planeta
{
public:
Planeta (int poz_x, int poz_y, int poz_z);
int pozycja_x;
int pozycja_y;
int pozycja_z;
};
//--------------------------------------------------------------/
Planeta::Planeta(int poz_x, int poz_y, int poz_z) :
pozycja_x(poz_x),
pozycja_y(poz_y),
pozycja_z(poz_z)
{}
//--------------------------------------------------------------/
void Planeta::rysuj() {
cout << "x = " << pozycja_x << endl;
cout << "y = " << pozycja_y << endl;
cout << "z = " << pozycja_z << endl;
}
//--------------------------------------------------------------/
int main()
{
Planeta planeta (1,2,3);
planeta.rysuj();
}
Revise this Paste