c++

.Net-like Intelisense for VC++?

Up until now in VC++, when I want to see everything I do :: . This shows all of my objects. Is there a way to make it like c# so it checks as you type without needing :: . Thanks ...

"using typedef-name ... as class" on a forward declaration

I'm doing some policy-based designs here and I have the need to typedef lots of template types to shorten the names. Now the problem comes that when I need to use a pointer to one of those types I try to just forward-declare it but the compiler complains with a test.cpp:8: error: using typedef-name ‘Test1’ after ‘class’ It's nothing to ...

How to extract the Windows OEM Key from Windows.

How would I go about extracting the Windows OEM Key from the Registry and saving it to a file. ...

Shatter Glass desktop Win32 effect for windows?

I would like a win32 program that takes the desktop and acts like it is shattering glass and in the end would put the pieces back together is there way reference on Doing this kind of effect with C++? ...

Checking for end of string in a switch statement, c++

I'm writing a program to basically check if a number is a type float, double, or long double for an assignment using switch statements and a state machine. I am stepping through my program, and it gets all the way to the end except doesn't seem to recognize the string terminator '\0'. So I was wondering if that portion of my code is co...

Can I write Windows drivers with Delphi 2010?

I've always heard that Delphi can do almost anything C++ can do...except write Windows drivers. Is this correct, and if so, why is that? I recently read a blog post online that may indicate a possible solution for writing drivers with Delphi, but it's 3 years old and I don't know how accurate this information is. So, with the latest v...

How to get keyboard input in an Homemade OS?

How to get keyboard input in an Homemade OS? ...

How to get path of file dragged into Win32 app and delete it?

I have a program and when they drop files into it I want it to get the path show a messagebox "of the path" then delete it. Can anyone shed some light on how to do this? ...

How to get the cursor point in a Window instead of whole desktop?

How to get the cursor point in a Window instead of whole desktop? ...

c++ compile error: ISO C++ forbids comparison between pointer and integer

I am trying an example from Bjarne Stroustrup's C++ book, third edition. While implementing a rather simple function, I get the following compile time error: error: ISO C++ forbids comparison between pointer and integer What could be causing this? Here is the code. The error is in the if line: #include <iostream> #include <string> us...

What claims, if any, can be made about the accuracy/precision of floating-point calculations?

I'm working on an application that does a lot of floating-point calculations. We use VC++ on Intel x86 with double precision floating-point values. We make claims that our calculations are accurate to n decimal digits (right now 7, but trying to claim 15). We go to a lot of effort of validating our results against other sources when o...

What does Int Main() mean in C++ ?

I have used the code many times as the starting of my program but never knew what it really meant which brought me to the question,What does Int Main() mean in C++ ? ...

subclass as specialization - ie: adding a method in the specialization

I want to add an additional conversion operator to a specialization of a template -can a spelcialization inherit all methods from its main template ? template<class T> MyClass { public: operator Foo() { return(getAFoo()); } }; template<> MyClass<Bar> { public: // desire to ADD a method to a specialization yet inherit // a...

Errors thrown from stl when compiling a module which uses the "Meschach" library

Hi, I'm working on a module which uses a shared library, which in turn has a static library linked to it. The shared library build works fine and generates a .so. When I try to use it in the module, I get a variety of errors, most of which are based on stl (stl collections to be specific), at the compilation stage. The errors look like: ...

Algorithm for finding all cycles in a directed graph on C++ using Adjacency matrix

Given graph adjacency matrix (for ex. g[][]), graph is directed. Needs find count of all graph cycles (if exists) and print them. I tried to wrote this algorithm in Java, sometimes it works correctly. If graph has complex cycles, algorithm return crazy cycles. Please, look at my code and help to resolve this problem public static final...

Can ActiveMQ CPP Api be used to Talk to RabbitMQ Broker?

We have C++ Software that needs to send message via RabbitMQ broker, has somebody tried ActiveMQ CPP lib (CMS) to send/receive messages to RabbitMQ broker? ...

Unwind a function call

This is a difficult problem to describe so please let me know if anything is unclear. I am trying to solve a possible deadlock situation in my C++ app and I am having trouble visualizing an appropriate solution. The restrictions placed on me by the two libraries I am trying to connect make my problem very complex and troublesome but it...

'MINMAXINFO' : undeclared identifier in MFC application

hi I tried to use MINMAXINFO to resize the window dynamically in MFC application (in VS 2008). i added OnGetMinMaxInfo function through properties window. When i compile the code, i get an error saying that 'ON_WM_GETMINMAXINFO': identifier not found 'MINMAXINFO' : undeclared identifier Please help me to resolve this. Regards, AH ...

CreateDIBSection is throwing, when trying to create cursor on Win

Hi, I am trying to create Cursor from png, and CreateDIBSection() is throwing. Follwoing is the snippet of code: HDC hdc = GetDC(NULL); void* lpBits = NULL; HBITMAP hBitmap; try { hBitmap = CreateDIBSection( hdc, (BITMAPINFO*)&bi, 0, &lpBits, NULL, (DWORD)0); } ReleaseDC(NULL, hdc); As CreateDIBSection is throwing, th...

Using extern to include files in C or C++

How this works in C or C++? extern "C" { #include <unistd.h> #include <fd_config.h> #include <ut_trace.h> #include <sys/stat.h> #include <sys/types.h> } ...