Since I'm a bit allergic to macros (I would even suggest replacing your current macros with const int) I probably shouldn't suggest this...but anyway...
You could define a macro that uses the stringify prepocessor operator (#), like this:
#define ASSIGN_TO_MAP(map, value) map[#value]=value...
An alternative would be to put in in a map.
#include <map>
typedef std::map<std::string, int> MyMap;
// ...
{
// Setup Map
MyMap map;
map["1ST_OPTION"] = 1;
map["2ND_OPTION"] = 2;
map["3RD_OPTION"] = 3;
// etc.
// ...
// Query for existance/value
MyMap::iterator...
Put the
#include<string>
into the .h file instead.
And refer to it winth the std namespace.
And make it a const ref.
Ie
#include<string>
.
.
.
class Bitmap
{
public:
Bitmap(const std::string&);
.
.
.
/Per
www.perfnurt.se
You won't necessarily get an Access Violation when you do funny stuff with unallocated memory.
That is one reason such bugs can be somewhat tricky to find as they sometimes result in funny, unexplainable (at first), behavior.
/Per
www.perfnurt.se
C++ simply doesn't support 100% pure OOP.
If that is a problem, use another language, like SmallTalk which is very OO.
Being 100% OO doesn't necessarily make sense in a non-academic world though...
/Per
www.perfnurt.se
>So why will microsoft ask you to "load symbols" to debug a problem? Are you seeing their variables?
Exactly. Seeing symbols (or their contents rather) is what debugging is all about.
Debug symbols are stored in .pdb files, so if you don't have the .pdb file for some module that's loaded...
>I need this external class to be able to access the Dialog Class, to set and get text from a edit box.
Consider if it's not the other way around. Ie the Dialog sets / gets data to the other class.
Reason: Acting upon events in the dialog is trivial since there is already message handling...
Not really. That functionality has been explicitly removed.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=10007&SiteId=1
If I write the macro myself I can generate anything. Actually I probably won't even generate the whole makefile, but rather just a makefile macro stating the .obj...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.