how are virtual tables stored in memory? their layout?
e.g.
class A{
public:
virtual void doSomeWork();
};
class B : public A{
public:
virtual void doSomeWork();
};
How will be the layout of virtual tables of class A and class B in memory?
...
I'm attempting to use a /D compiler option on MSVC6 to define a string, but there's something weird about using double quotes around it. To debug this problem, it would be extremely helpful for me to be able to see what value the preprocessor is actually substituting into my code where the macro is expanded. Is there any way I can do t...
This is actually a question about a huge number of winapi functions.
A typical MS documentation says (from http://msdn.microsoft.com/en-us/library/bb762194%28VS.85%29.aspx ):
BOOL SHGetPathFromIDList(
PCIDLIST_ABSOLUTE pidl,
LPTSTR pszPath
);
pidl [in] The address of an item identifier list that specifies a file
or direc...
Is there a way to make Windows Mobile not use the main phone app? I have my own phone app that I want to handle phone transactions for a business device.
My app works fine (detects the call and can hang up), but the main phone app still wants to allow the user to answer a call normally. I can try to hide the incoming call window or ...
I am pondering about partial specialization. While I understand the idea, I haven't seen any real-world usage of this technique. Full specialization is used in many places in STL so I don't have a problem with that. Could you educate me about a real-world example where partial specialization is used? If the example is in STL that would b...
I have three variable declared as doubles:
double Delay1 = 0;
double Delay2 = 0;
double Delay3 = 0;
I Then get their values from the user:
cout << "Please Enter Propogation Delay for Satellite #1:";
cin >> Delay1;
...
But when I check these values to see if they are null (user just hit enter and did not put a number) it doesn't w...
Possible Duplicates:
Why should i learn C++.
Which one: C++ or Java?
Hello. I only know Java and Assembly currently but was thinking of learning C++. However, I would like to hear from someone more experienced in the programming field which language should I dive into the most for general programming purposes (as in, the most ...
hi friends
i m using malloc to allocate memory and memory requirements are greater than 1GB. so program is crashing...
i want to ask whether this problem can be solved??If yes than how??
my RAM size is 3GB and using 32 bit windows os and programming using vc++
...
I am looking for a book and or a code sample of how to do serial port redirection or port splitting. I write a lot of com port applications and want to write a monitor application that will allow me to watch the serial port between the application and the device.
So I want to be able to redirect the serial port to another port so I can...
I'm reading about STL algorithms and the book pointed out that algorithms like find use a while loop rather than a for loop because it is minimal, efficient, and uses one less variable. I decided to do some testing and the results didn't really match up.
The forfind consistently performed better than the whilefind. At first I simply tes...
I tried this code on Visual C++ 2008 and it shows that A and B don't have the same address.
int main()
{
{
int A;
printf("%p\n", &A);
}
int B;
printf("%p\n", &B);
}
But since A doesn't exist anymore when B gets defined, it seems to me that the same stack location could be reused...
I don't understand why th...
I have a C++ project that has to build on Linux but I don't have a Linux machine set up to run any kind of GUI (they all have no monitors). So the question is, can I use eclipse to develop via a file share and build via SSH? I've been doing this and aside from putting lots of ware on alt+tab the only problem seems to be that auto-complet...
Is there a way to get the CPU and memory usage programatically (C++) of an application on HPUX?
...
When trying to debug a program on Windows I can't seem to find where the output I push to stderr is going. How do I get a hold of my stderr output? Is there a debugger-level setting (MSVC 9) I can change to redirect stderr to some part of the UI?
Update: I have not looked into TRACE or OutputDebugString, but the code base is cross-platf...
I've got an unmanaged c++ console application in which I'm using srand() and rand(). I don't need this to solve a particular problem, but was curious: is the original seed passed to srand() stored somewhere in memory that I can query? Is there any way to figure out what the seed was?
...
I am looking for a clean way to check if a registry key exists. I had assumed that RegOpenKey would fail if I tried to open a key that didn't exist, but it doesn't.
I could use string processing to find and open the parent key of the one I'm looking for, and then enumerating the subkeys of that key to find out if the one I'm interested ...
I have a simple c++ application that generates reports on the back end of my web app (simple LAMP setup). The problem is the back end loads a data file that takes about 1.5GB in memory. This won't scale very well if multiple users are running it simultaneously, so my thought is to split into several programs :
Program A is the main exec...
Pre-compiled headers seem like they can save a lot of time in large projects, but also seem to be a pain-in-the-ass that have some gotchas.
What are the pros & cons of using pre-compiled headers, and specifically as it pertains to using them in a Gnu/gcc/Linux environment?
...
Are there any free tools that convert c++ code to idl? I am thinking of something similar to java2idl.
...
Hi,
Is there some tool that can automatically convert the following c style code
A *a = b;
to
A *a = (A*)b;
Thanks,
James
...