Answer the question
In order to leave comments, you need to log in
How are class descriptions stored in memory?
I understand how objects are stored in memory, but how is the description of classes stored? And is it stored at all? If yes, in what form? (The answer in the form of zeros and ones, as you understand, will not suit you :)) If you can, advise some book or video tutorials on the topic.
PS If this is correct, please explain using these two classes as an example:
class A{
int *n;
int* GetN() { return n; }
};
class B : public A {
char *ch;
char* GetCh() { return ch; }
};
Answer the question
In order to leave comments, you need to log in
Classes in C++ exist until the program is compiled.
In a compiled program, only a table of virtual functions can remain from a class, and it is not a fact that the compiler will not throw out virtual calls, replacing them with real ones.
Compile your program, load the debug version into IDA and watch. As correctly noted above, different compilers can add this information in different ways.
But how is the description of the classes stored? And is it stored at all?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question