w = Rower::add(x, 130); - to jest w main
w i x to obiekty klasy Rower
jak zaimplementowac takiego potworka ?
w = Rower::add(x, 130); - to jest w main
w i x to obiekty klasy Rower
jak zaimplementowac takiego potworka ?
Rower może być tu po prostu metodą statyczną klasy Rower.
class Rower
{
public:
static Rower add(Rower& r,int x)
{
return r; //np
}
};