3 ms·
In Rule 3: struct Ship { int fuel; }; void print(Ship* ship) { cout << ship.fuel << endl; } Should that be "ship->fuel" instead?
by rdtsc 3y ago
In Rule 3:
struct Ship { int fuel; };
void print(Ship* ship) {
cout << ship.fuel << endl;
}
Should that be "ship->fuel" instead?