Re: Porting from VC6 to VS2005



Joseph M. Newcomer wrote:
I got done in by the complement of that...

if(int i = ...)

if(i = ...)

if(i = ...)

Joe:

I don't see this construct with "if" as anything I would ever do, but the analogous thing with "for" is of course very common. IMHO, absolutely the best way to deal with this is the

#if _MSC_VER < 1300
#define for if(false){} else for
#endif

trick. Then you never need to write obsolete code again, and your VC6 projects will update correctly.

--
David Wilkinson
Visual C++ MVP
.



Relevant Pages

  • Re: Save text from CList into file
    ... Joseph M. Newcomer ha escrito: ... Why NULL for the default extension when you clearly meant _T? ... See my articles on using FormatMessage in MFC on my MVP Tips site ...
    (microsoft.public.vc.mfc)
  • Re: .Saved property doesnt change
    ... In article, Joseph M. Newcomer wrote: ... // OMITTED: report error here ... Joseph M. Newcomer ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.office.developer.vba)
  • Re: SDK and VC6.0
    ... "Joseph M. Newcomer" wrote: ... > us to give up VS6. ... > MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Spam humor
    ... "Joseph M. Newcomer" wrote in message ... Title: Brain Damage Lawyer ... Joseph M. Newcomer ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: how to end a thread from the main thread
    ... >> Suppose for this example I have a boolean, ThreadRunning, on behalf of a view. ... Joseph M. Newcomer ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)

Loading