Unicode in C++
What's the best practice of unicode processing in C++? ...
What's the best practice of unicode processing in C++? ...
in c++, Iam trying to catch all types of exceptions in one catch (like catch(Exception) in C#). how is it done ? and more, how can one catch devide-by-zero exceptions ? ...
How can i stop the host machine entering 'standby' mode while my application is running? Is there any win32 api call to do this? ...
Whilst refactoring some legacy C++ code I found that I could potentially remove some code duplication by somehow defining a variable that could point to any class method that shared the same signature. After a little digging, I found that I could do something like the following: class MyClass { protected: bool CaseMethod1( int abc,...
I have this modeless MFC dialog which embeds an Internet Explorer web browser control. The control is derived straight from CWnd with ActiveX wrappers generated by Visual Studio, and I map it to the CDialog using only a "DDX_Control(pDX, IDC_EXPLORER, m_explorer);" I have 2 problems. Problem #1: Being modeless, I start and stop the di...
I have a class in system-C with some data members as such: long double x[8]; I'm initializing it in the construction like this: for (i = 0; i < 8; ++i) { x[i] = 0; } But the first time I use it in my code I have garbage there. Because of the way the system is built I can't connect a debugger easily. Are there any methods to...
I'm returning to c++ after being away for a bit and trying to dust off the old melon. In Java Iterator is an interface to a container having methods: hasNext(), next() and remove(). The presence of hasNext() means it has the concept of a limit for the container being traversed. //with an Iterator Iterator<String> iter = trees.iterator...
Trying to honor a feature request from our customers, I'd like that my application, when Internet is available, check on our website if a new version is available. The problem is that I have no idea about what have to be done on the server side. I can imagine that my application (developped in C++ using Qt) has to send a request (HTTP ...
We have a two-screen DirectX application that previously ran at a consistent 60 FPS (the monitors' sync rate) using a NVIDIA 8400GS (256MB). However, when we swapped out the card for one with 512 MB of RAM the frame rate struggles to get above 40 FPS. (It only gets this high because we're using triple-buffering.) The two cards are from t...
I'm stuck on a fix to a legacy Visual C++ 6 app. In the C++ DLL source I have put extern "C" _declspec(dllexport) char* MyNewVariable = 0; which results in MyNewVariable showing up (nicely undecorated) in the export table (as shown by dumpbin /exports blah.dll). However, I can't figure out how to declare the variable so that I can acc...
I noticed recently that there is a Northwest C++ Users Group. Is there anything similar in the Northeast? Edit: I'm particularly interested in the Boston area, but others SO readers might be interested in other locations as well. ...
What is the approved way to convert from char* to System::string and back in C++/CLI? I found a few references to marshal_to<> templated functions on Google, but it appears that this feature never made the cut for Visual Studio 2005 (and isn't in Visual Studio 2008 either, AFAIK). I have also seen some code on Stan Lippman's blog, but it...
In Windows, is there an easy way to tell if a folder has a subfile that has changed? I verified, and the last modified date on the folder does not get updated when a subfile changes. Is there a registry entry I can set that will modify this behavior? If it matters, I am using an NTFS volume. I would ultimately like to have this abil...
Is there a way to access file system info via some type of Windows API? If not what other methods are available to a user mode developer? ...
Hi everyone. I'm having a little trouble figuring out exactly how const applies in a specific case. Here's the code I have: struct Widget { Widget():x(0), y(0), z(0){} int x, y, z; }; struct WidgetHolder //Just a simple struct to hold four Widgets. { WidgetHolder(Widget a, Widget b, Widget c, Widget d): A(a), B(b), C(c), D...
I know references are syntactic sugar, so easier code to read and write :) But what are the differences? Summary from answers and links below: A pointer can be re-assigned any number of times while a reference can not be reassigned after initialization. A pointer can point to NULL while reference can never point to NULL You can't ta...
Hi all, I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code? This is the wrapper that I have which calls GetData() defined in a C++ file: [DllImport("Unmanaged.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint ...
Hello, I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really programming) that C++ classe...
Does any one have a simple C++ example for sending e-mail using smtp api? ...
I'm using Eclipse as my IDE for a C++ project, and I would love for it to tell me where a given symbol is defined and what the parameters are for a function. However, there's a catch: I also use Lazy C++, a tool that takes a single source file and generates the .h and the .cpp files. Those .lzz files look like headers, but this tool sup...