Cpp Python to cpp

From wikinotes

This page is to help me with the transition, creating bridges between information I know in python, and what it's equivalent is in cpp.

builtin

sizeof(va );          // len(var)
typeid(cls).name();   // repr(str)  ## closest I can come to it, unreliable though
                      // int(str)

cout << "hello";      // print text (writing to stdout)
cerr << "error";      // print text (writing to stderr)

types

int * var = nullptr;		// None (a pointer pointing to nothing)

concepts

int main() {...}              // if __name__ == '__main__':

MyClass::MyClass ()  {...}    // constructor (__init__)
MyClass::~MyClass () {...}    // destructor  (__del__)