15,892,005 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Michael Waters (Top 7 by date)
Michael Waters
8-Dec-16 19:04pm
View
That's the best option that I have been able to find, but I've had some trouble getting to work.
Michael Waters
3-May-11 12:47pm
View
It's been a couple of weeks since I had a chance to implement this approach, and I ran into another obstacle. It seems that CString (which I'm using as the key to my hash table implementation) doen't overload the inplace new operator at all. So even after I derive a class from CString and overload it's inplace new operator, the compiler still spits out that it doesn't recognize the class-specific inplace new operator. I couldn't figure out WHY that was the case, until I ran across the following
http://www.gotw.ca/publications/mill15.htm
, which explained why it is if CString doesn't overload the inplace new, my own overload won't compile.
So, it looks like I will have to rewrite my hash table to use a different key (probably a copy of CString, with the appropriately overloaded new operator), but I doubt I'll get a chance to do that level of rewrite any time in the near future. I thiknk I will go ahead and accept this solution, tentatively, since I'm pretty sure, from my research, that this approach will prove correct.
That's an awful lot of work just to make _DEBUG report line numbers! And here I thought I was asking a question that was going to have a simple solution :)
Michael Waters
19-Apr-11 17:14pm
View
I only undefine the debug version for the one particular code block - and I might mention that when I tracked down the MFC code and saw what it was doing, it explained all those CMap memory leaks reported in the Output window that didn't have line numbers attached to them. I would think after all these years, the MFC code would have been modified with a better work around than just "don't do that".
Michael Waters
19-Apr-11 17:10pm
View
Interesting approach, but I don't think it's quite the solution I need.
Michael Waters
19-Apr-11 17:06pm
View
But the issue of the inplace syntax is key (literally). I have a string hash table with a previously allocated bucket, practically a copy of CMapStringToOb (that's how I found my soltion, because it's what Micorsoft does), and it uses the inplace syntax to instantiate an empty string key for each new bucket in the hash. I'll try your approach and see what happens.
Michael Waters
26-Oct-10 11:40am
View
We already store an individual object archive number, but I want to add the _WIN_VER dependency to cover all the bases, since we have multiple users with multiple versions of the application floating around out there, and thse are mission critical data files. Sure, we can tell all of our users to upgrade to the latest build of the software, but experience has shown us that users don't always listen to us.
Michael Waters
26-Oct-10 11:32am
View
Wow, that was fast! I love Code Project. Thanks for the help.
So the change occurred between _MFC_VER 0x0700 and _MFC_VER 0x0710. The problem lies in that the files store a mixture of both BOOL (code dating from before bool was part of the C++ standard) AND bool values. I'm trying to migrate it all to use bool only, but it's a slow process as we finally transition from Studio 6 to Studio 10.
Show More