Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. undeclared identifier

undeclared identifier

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    i'm trying to use the max(int, int) method from stdlib I'am including stdlib, but the compiler keeps tellling me that the 'max' is an undeclared identifier. does anyone know how to get me out of this problem? thank you. X|

    O A 2 Replies Last reply
    0
    • L Lost User

      i'm trying to use the max(int, int) method from stdlib I'am including stdlib, but the compiler keeps tellling me that the 'max' is an undeclared identifier. does anyone know how to get me out of this problem? thank you. X|

      O Offline
      O Offline
      Orbital
      wrote on last edited by
      #2

      HI! Try to use __max(int,int) #include void main(void) { int maxim = __max(20,10); } Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

      1 Reply Last reply
      0
      • L Lost User

        i'm trying to use the max(int, int) method from stdlib I'am including stdlib, but the compiler keeps tellling me that the 'max' is an undeclared identifier. does anyone know how to get me out of this problem? thank you. X|

        A Offline
        A Offline
        Antonio Mazzeo
        wrote on last edited by
        #3

        max is a macro The Borland C++ compiler define max in stdlib.h, but Visual C++ define max in Windef.h Antonio

        M 1 Reply Last reply
        0
        • A Antonio Mazzeo

          max is a macro The Borland C++ compiler define max in stdlib.h, but Visual C++ define max in Windef.h Antonio

          M Offline
          M Offline
          Mike Nordell
          wrote on last edited by
          #4

          max is a macro In Windows it is, in C it is and in "Visual C++" it often is, but in C++ it is not. In C++ it is a template function that is to be found in (IIRC) algorithm.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups