Posts, notes, resources on C++, C++11/C++14.
Table of Contents
- C++11 timing code execution
- virtual method tables, vtables, for C++ inherited classes and keyword virtual
cf. Solarian programmer gave an excellent write up in C++11 timing code performance
I implemented the classic algorithm of binary search using C++11/14 vector(s) (library) in vectors_binarysearch.cpp, inside the folder ../Cpp14 of my CompPhys github repository
My implementation of the examples above for functors here on github:
C++ templates, class templates and how to put them into header files; Useful links related to splitting up header files for declaration, split to
.cpp files for definitions
While I already wrote about it in the README.md of my github repository folder
CompPhysUseful links related to splitting up header files for declaration, split to .cpp files for definitions, github repo CompPhys, folder cpp, I had to look it up again, and so I’ll reiterate that material here.
Gives the reason why.
virtual method tables, vtables, for C++ inherited classes and keyword virtual
I put together some basic, pedagogical C++ scripts, collected reading material (because a lot of great explanations on old websites are being lost as old websites get deleted, and being cache’ed only in the Wayback machine website; I’ll reproduce what I can in this following github repository), and gdb‘ed thoroughly the memory layouts of these vtables and class data members, and class object instances (pointers to a new class instance) here:
Texture Object API
struct cudaResourceDesc resDesc
struct myStruct myVariable;
struct Leopard leopard;
leopard.base.animal.weight = 44;
struct inherit copy from another struct declare c c++
Typesafe inheritance in C
Difference between ‘struct’ and ‘typedef struct’ in C++?
typedef struct vs struct definitions [duplicate]
Google search terms
how to declare an instance of a struct C++
Proper way to initialize C++ structs