consolidate all repos to one for archive

This commit is contained in:
2025-01-28 13:46:42 +01:00
commit a6610fbc7a
5350 changed files with 2705721 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#include <iostream>
#include "Point.h"
int Point::getX() {
return x;
}
int Point::getY() {
return y;
}
//void Point::setX(int xx) {
void Point::setX(int x) {
//x=xx;
this->x=x;
}
void Point::setY(int y) {
this->y=y;
}
void Point::print() {
std::cout << "(" << x << "," << y << ")" << std::endl;
}

View File

@@ -0,0 +1,17 @@
#ifndef EXAMPLE01_POINT_H
#define EXAMPLE01_POINT_H
class Point {
private:
int x, y;
public:
int getX();
int getY();
void setX(int x);
void setY(int y);
void print();
};
#endif //EXAMPLE01_POINT_H

View File

@@ -0,0 +1,20 @@
#include <iostream>
#include "Point.h"
int main() {
Point a;
Point b;
//Point b(a);
/**/
a.setX(3);
a.setY(2);
b.setX(1);
b.setY(1);
std::cout << a.getX() << std::endl;
std::cout << a.getY() << std::endl;
//b.x=10;
a.print();
b.print();
return 0;
}