What does “const class” mean?

The const is meaningless in that example, and your compiler should give you an error, but if you use it to declare variables of that class between the closing } and the ;, then that defines those instances as const, e.g.: const class A { public: int x, y; } anInstance = {3, 4}; // … Read more

Passing structs to functions

First, the signature of your data() function: bool data(struct *sampleData) cannot possibly work, because the argument lacks a name. When you declare a function argument that you intend to actually access, it needs a name. So change it to something like: bool data(struct sampleData *samples) But in C++, you don’t need to use struct at … Read more

MSVCP120d.dll missing

From the comments, the problem was caused by using dlls that were built with Visual Studio 2013 in a project compiled with Visual Studio 2012. The reason for this was a third party library named the folders containing the dlls vc11, vc12. One has to be careful with any system that uses the compiler version … Read more

reading an application’s manifest file?

Windows manifest files are Win32 resources. In other words, they’re embedded towards the end of the EXE or DLL. You can use LoadLibraryEx, FindResource, LoadResource and LockResource to load the embedded resource. Here’s a simple example that extracts its own manifest… BOOL CALLBACK EnumResourceNameCallback(HMODULE hModule, LPCTSTR lpType, LPWSTR lpName, LONG_PTR lParam) { HRSRC hResInfo = … Read more

Why is inlining considered faster than a function call?

Aside from the fact that there’s no call (and therefore no associated expenses, like parameter preparation before the call and cleanup after the call), there’s another significant advantage of inlining. When the function body is inlined, it’s body can be re-interpreted in the specific context of the caller. This might immediately allow the compiler to … Read more