CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Threaded View

  1. #11
    Join Date
    Oct 2002
    Posts
    36
    Originally posted by AnthonyMai
    To my knowledge, unless your knowledge is better than mine, there is NOT a max or min templated function specified in STL. There is only a max and min member function defined for the template class numeric_limits.
    Sorry, maybe I should have said the max & min template functions from the C++ Standard Library instead of STL (C++ Programming Language - Stroustrup 18.9)

    http://wwwinfo.cern.ch/asd/lhc++/RW/...r/max_6671.htm
    or
    http://www.josuttis.com/libbook/util/minmax1.cpp.html
    or
    http://www.sgi.com/tech/stl/max.html

    Originally posted by AnthonyMai
    name space would not help you to resolve name conflict with a macro defined using the same name. That's because macros names are not really names. It simply get replaced during the pre-process. name space only helps to resolve name conflict after the code is compiled and before it is linked.
    Thinking about it, that makes sense.....

    macros - tricky devils
    Last edited by dumah; October 26th, 2002 at 02:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured