some changes ; mostly new examples

This commit is contained in:
rattatwinko
2025-04-29 21:21:54 +02:00
parent 79670e7723
commit e7d74b2ee5
10 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#include <iostream>
/*
This here that we have is just another demo of the OOP in c++ ; we have the function that we have in the last example and then we usefully do something
with this function ;
*/
using namespace std;
class Car {
public:
int speed(int max_speed);
};
int Car::speed(int max_speed) {
return max_speed;
}
int main() {
Car volvo;
volvo.speed(600);
}