What does `dword ptr` mean?

The dword ptr part is called a size directive. This page explains them, but it wasn’t possible to direct-link to the correct section. Basically, it means “the size of the target operand is 32 bits”, so this will bitwise-AND the 32-bit value at the address computed by taking the contents of the ebp register and … Read more

Javascript: ‘window’ is not defined

It is from an external js file and it is the only file linked to the page. OK. When I double click this file I get the following error Sounds like you’re double-clicking/running a .js file, which will attempt to run the script outside the browser, like a command line script. And that would explain … Read more

switch case: error: case label does not reduce to an integer constant

switch labels must be constant expressions, they have to be evaluated at compile time. If you want to branch on run-time values, you must use an if. A const-qualified variable is not a constant expression, it is merely a value you are not allowed to modify. The form of integer constant expressions is detailed in … Read more

Categories C Tags

Invalid conversion from ‘char’ to ‘const char *’

You’re trying to pass a char to LoadFileToString which takes in a char*. I think what you intend to do is this Notice that I’m reading the input into a string instead of a char since the LoadFileToString expects a (C-style) string to be passed in; instead you’re reading and trying to pass a character … Read more