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,35 @@
#ifndef EXAMPLE05_COMPLEX_H
#define EXAMPLE05_COMPLEX_H
class Complex {
private:
double real, imag;
static int counter; // class variable
//static const int counter1; // constant class variable
public:
Complex(); // default constructor
Complex(double r, double i = 0); // conversion constructor
Complex(const Complex& c); // copy constructor
~Complex(); // destructor
void print() const;
Complex plus(const Complex& c) const;
//static int getCounter();
static int getCounter() { // class method
return counter;
//return real; // ERROR
//return counter++; // OK
//return this->counter; // ERROR
}
/*
//static int getCounter1() const { // const is not allowed for class methods
static int getCounter1() { // class method
return counter1;
//return counter1++;
}
*/
};
#endif //EXAMPLE05_COMPLEX_H