REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found

This is almost certainly due to a missing dependency. Use a tool like Dependency Walker to find the required dependencies of the DLL. Or, if the DLL is supplied by a third party, read their documentation which should specify the required dependencies. Note that Microsoft.VC90.ATL indicates version 9 of MSVC which is VS2008. So you would need to install … Read more

Why do I get: -9223372036854775808

The one glaring error is this: Since maxPower is 50, you are accessing an element that’s out of bounds. This is undefined behavior Also, to make the code legal C++, either declare an array of 50: or declare a std::vector<int64_t>. When you do that and use at() instead of [], then you get a better view of how your program breaks. See the … Read more

C++ equivalent of StringBuffer/StringBuilder?

The C++ way would be to use std::stringstream or just plain string concatenations. C++ strings are mutable so the performance considerations of concatenation are less of a concern. with regards to formatting, you can do all the same formatting on a stream, but in a different way, similar to cout. or you can use a strongly typed functor which … Read more

Declare a bit in C++

There is none. The smallest addressable entity is a byte. This is the char or unsigned char type. (The best type is the integer because it is aligned to the width of your processor and thus fastest to fetch and work on) To work with bits you need to use boolean operators and mask/shift your … Read more

Negative RGB Values

A possible reason for 8-bit signed values for pixel calculation comes from the necessity to represent RGB colors in YUV, YCrCb or other modes with chrominance. The Chrominance channels are encoded as differences in Green-Blue and Green-Red or Green-Yellow, Red-Blue etc. to simplify the answer. This range has also negative values.