Hi all,
If you are windows programmer and you want to program something new where you
are going to use some new API with which you are not that familiar then you can type MSDN on your web browser and you get immediately what you need. Nicely grouped API functions where you can see what to include and what to link.
I am looking for som...
Hi:
I have a Symbol LS2208 barcode scanner and works OK in my linux box (Kubuntu 8.10 Intrepid Ibex). Whenever you scan a barcode the scanner (connected to an USB port) sends the reading to wherever the text caret is. I would like to redirect all the readings from the scanner to an specific widget in my application (i.e. a text edit con...
Hi,
anyone know of a free open-source jpeg encoding library for C/C++? Currently I'm using ImageMagick, which is easy to use, but it's pretty slow. I compared it to an evaluation of Intel Performance Primitives and the speed of IPP is insane. Unfortunately it also costs 200$, and I don't need 99% of the IPP). Also it will only work f...
Are there any issues when passing 'this' to another object in the initializer list in the following code?
class Callback { public: virtual void DoCallback() = 0; };
class B
{
Callback& cb;
public:
B(Callback& callback) : cb(callback) {}
void StartThread();
static void Thread()
{
while (!Shutdown())
...
How do you find code that was intended to be reused if you do not know it exists?
In a large code base with many library functions how do you know if the code you intend to write has already been written?
...
Hello!
I need to convert strings from one encoding (UTF-8) to another. The problem is that in the target encoding we do not have all characters from the source encoding and libc iconv(3) function fails in such situation. What I want is to be able to perform conversion but in output string have this problematic characters been replaced w...
I am writing a very simple 3d particle software rendering system, but I am only really interested in coding the particle system and the rasterizer, so what I am looking for, is the easiest way to go from 3d particle coordinates, through camera, to screen coordinates, but with features like variable FOV, and targeted (look at) camera.
An...
I want to find the first item in a sorted vector that has a field less than some value x.
I need to supply a compare function that compares 'x' with the internal value in MyClass but I can't work out the function declaration.
Can't I simply overload '<' but how do I do this when the args are '&MyClass' and 'float' ?
float x;
std::vect...
In C++, what is the difference between the following examples?
Re-throw pointer:
catch (CException* ex)
{
throw ex;
}
Simple re-throw:
catch (CException* ex)
{
throw;
}
When the re-throw is caught, will the stack trace be different?
...
I am trying to call the "Run" function in a new thread. Right now, I have this code using openMP that doesn't actually run "Run" in a new thread. NOTE: I am not asking for help using OpenMP. This code was just a quick fix. I would prefer a CreateThread() method of going about this.
vector<ICommand*>* commands;
string strInput;
// For ea...
I am looking to find out why strncpy is considered insecure. Does anybody have any sort of documentation on this or examples of an exploit using it?
...
Is it possible to use to use libs compiled with /MT in C++ CLR? It throws me either a ton of LNK2022 "metadata operation failed (8013118D)" errors (if I use /MD in the CLR project) or " '/MT' and '/clr:pure' command-line options are incompatible" if I use /MT.
What do I need to change in the library? The library is mine, but it includes...
I have a Windows C program that gets its data through a redirected stdin pipe, sort of like this:
./some-data-generator | ./myprogram
The problem is that I need to be able to read from stdin in a non-blocking manner. The reason for this is that (1) the input is a data stream and there is no EOF and (2) the program needs to be able to...
I'm opening lots of files with fopen() in VC++ but after a while it fails.
Is there a limit to the number of files you can open simultaneously?
...
I'm trying to make it where the character is in a tile and when they move up or down it moves to the next tile but I'm not sure how to do that. Right now, I have it set up where the character moves by pixels but I want it to move by 1 square.
The code right now is this, and it works, but it's glitchy in pixel mode. I believe if it was...
For a few projects I'm working on I need a persistent key value store (something akin to memcache). It would ideally run as a server; it needs to be really efficient. I'm aware that memcachedb exists, but I'd like to have a go at writing it myself as there's going to be a lot of custom functionality that I'll need to include later on. I'...
I looked at a couple other questions on SO - and not really sure they answer this question.
We are building C++ applications for Win32 and Linux. Right now we have some scripts (bat files for win32) that run on a schedule to do builds.
We'd like to have CI for our projects, but I'd like to have only one CI server that handles buildin...
I need to burn CD/DVD disks from my C++ program. Can you recommend me a method?
Edit: The platform is Windows.
...
I know about CMake and bakefile already, but that is not what I am looking for.
Is there a tool that will generate a makefile given a VC project? (or at least a first attempt at one) so I don't have to do all the work by hand?
Alternatively, is there a tool that makes CMake files?
Edit:
Following the link below leads me to this:...