|
And for (1), use the following to get rid of the error :-
enum Keys
{
classesRoot = (LONG)(ULONG_PTR)HKEY_CLASSES_ROOT
};
|
|
|
|
|
Nish, I want to give you a big wet kiss )
Now to get rid of those 'deprecated' warnings.
|
|
|
|
|
waldermort wrote: There are many errors I have never seen before...
Because VC++ is now more compliant.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
VC6 let you treat an iterator as a pointer. That's what you're trying to do here, in reverse, grab a pointer and pass it through as if it were an iterator. The change is to make it more standards conformant, and it happened in VC2002.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Guess you learn something new every day. I always thought an iterator was a pointer, except for the fact that when increasing it it instead increases by the size of what it's pointing at.
As for this VS8, it's already making my eyes ache
|
|
|
|
|
A pointer has behaviour that makes it a valid random access iterator, they basically behave the same.
Yeah, it was a big change ( and a change to being more VB like IMO ). The absence of the class wizard is a pain, the new system doesn't work as well IMO, I tend to hand wire events ( but then, I always did ). But, once you're used to it, it is a lot better, although VC2005 C++ support in things like intellisense is not so great.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My first impression was not all that great. I have had to find and change so many setting/options/toolbars.. just to have an environment similar to what I am used to.
I have never used the class wizard so I'm not missing anything there. I do like the extra memory validation that goes on the background though. It found a few stack corruptions that I would have otherwise missed (partly due to converting to the 'safe' CRT).
I'm not sure if it's my configuration or just the IDE, but the compile times have almost doubled. It can be a pain when trying to debug. Also, I have not figured out yet how to position the watch window. It's currently tabbed, I want to be able to see the watch and the local/auto variables at the same time.
Gonna take some time to get used used to.
|
|
|
|
|
waldermort wrote: enum Keys
{
classesRoot = HKEY_CLASSES_ROOT,
};
If you don't really need an enum type, it might be better to turn those into static const members, which you can init in the header file:
class CFoo
{
public:
static const HKEY classesRoot = HKEY_CLASSES_ROOT;
}; That also has the advantage of preserving the type-safety of classesRoot .
|
|
|
|
|
RE: Problem #2.
Your old code worked because previous versions of the stl implemented iterators as C++ pointers.
In the latest implementation you can no longer assume that iterators and pointers are equivalent.
tiles.erase( ( tiles.begin() + p2 ) ) shoule work fine assuming that p2 is the index of the element you want to remove.
|
|
|
|
|
I wish to display a help file (*.chm) in a VC++ 6.0 MFC Application .
I've created the CHM file using a software and I just want to display the chm file when the Help button is clicked.
It's better if u can give a sample code.
Your help is highly appreciated.
Thanks in Advance
TDK
ENTC
UoM
|
|
|
|
|
|
Dhananjayak02 wrote: ve created the CHM file using a software and I just want to display the chm file when the Help button is clicked.
associate the help chm with the help id!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
When a release build dies with "the instruction at location xyz..." how do I find out the where in the source that was? If I choose to see the stack dump, can that tell me (assuming no stack corruption) what my calling path is?
I assume you need some kind of separate debug info file (with address to function lookups or something) generated at build time.. but I'm not sure what debug info I need to generate, and then how I would tie up the stack and instrucion addresses to functions?
Thnx in advance.
|
|
|
|
|
you need a "Map" file. it'll give you the addresses of all the funcitons in your EXE.
there's a checkbox, somewhere in the linker options, to turn this on.
|
|
|
|
|
|
See if this article helps.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for the help guys. Much appreciated!
|
|
|
|
|
Does VC6 support the __FUNCTION__ macro? If so, where is it defined? If it doesn't exist, can anybody recomend a similar method of getting the function name?
|
|
|
|
|
Wouldn't "__LINE__ of __FILE__ " suffice?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Normally yes, but in this instance I really need to get a hold of the function name.
|
|
|
|
|
No, that was added in VC7 (or maybe 7.1, I forget). There's no simple way to do it in 6.
|
|
|
|
|
please check my thread on the c# forum, any idea ?
(thread: "Bizzare question")
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=1697316&df=100#xx1697316xx
thanks,
Liron
|
|
|
|
|
Liron Hirsch wrote: please check my thread on the c# forum, any idea ?
Why, are you wanting a VC++ answer?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
it might help me too, a guy in the C# forum replied and said I might find the answer in c++
|
|
|
|
|
If you have a question C++ you can ask on this forum not shift to another forum
|
|
|
|