Object-Oriented Programming in C++

Code display of PL9/myclass.h

// PL9/myclass.h
// header file for class definition; also defined namespace
// Niels Walet, Last modified 06/01/2022
#ifndef MY_CLASS_H // Will only be true the once!
#define MY_CLASS_H
namespace namespace1 {
  class my_class
  {
  private:
    int x;
  public:
    my_class() : x{} {} 
    my_class(int xx) : x{xx} {}
    ~my_class(){}
    void show();
  };
}
#endif
Download here; To copy and paste: double click inside code, then copy.