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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. NULL is not recognized!!!!

NULL is not recognized!!!!

Scheduled Pinned Locked Moved C / C++ / MFC
c++debugginghelpquestion
11 Posts 5 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.
  • N Offline
    N Offline
    NicholasCougar
    wrote on last edited by
    #1

    Hi, I am practice RTTI excerices and encounter such a debug result.

    struct NCL_Runtime CVehicle::structCVehicle=
    {szCVehicle, sizeof(CVehicle), 0xffff, NULL, NULL};

    debug result is

    J:\pearl\Sim02\Vehicle.cpp(16) : error C2065: 'NULL' : undeclared identifier

    Plz tell me WHY?????? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

    J 1 Reply Last reply
    0
    • N NicholasCougar

      Hi, I am practice RTTI excerices and encounter such a debug result.

      struct NCL_Runtime CVehicle::structCVehicle=
      {szCVehicle, sizeof(CVehicle), 0xffff, NULL, NULL};

      debug result is

      J:\pearl\Sim02\Vehicle.cpp(16) : error C2065: 'NULL' : undeclared identifier

      Plz tell me WHY?????? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      NULL is not a C++ keyword, but rather a macro defined in a lot of usual headers, like <stdlib.h> or <windows.h>. In your case, none of these headers happens to be included. You can safely replace NULL with 0. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      B 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        NULL is not a C++ keyword, but rather a macro defined in a lot of usual headers, like <stdlib.h> or <windows.h>. In your case, none of these headers happens to be included. You can safely replace NULL with 0. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        B Offline
        B Offline
        Braulio Dez
        wrote on last edited by
        #3

        Oye Joaquin no paras tio !, estás hecho un máquina ;-)... Me parece que Chris debería de darte una camiseta de codeproject por la colaboración que haces... Un saludo Braulio

        J T 2 Replies Last reply
        0
        • B Braulio Dez

          Oye Joaquin no paras tio !, estás hecho un máquina ;-)... Me parece que Chris debería de darte una camiseta de codeproject por la colaboración que haces... Un saludo Braulio

          J Offline
          J Offline
          Joaquin M Lopez Munoz
          wrote on last edited by
          #4

          Hola Braulio. No te creas que estoy todo el día aquí, tan sólo que cuando tengo algún ratito me divierto más contestando a la gente que navegando por playboy.com :) Un saludo. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

          L 1 Reply Last reply
          0
          • J Joaquin M Lopez Munoz

            Hola Braulio. No te creas que estoy todo el día aquí, tan sólo que cuando tengo algún ratito me divierto más contestando a la gente que navegando por playboy.com :) Un saludo. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

            L Offline
            L Offline
            l a u r e n
            wrote on last edited by
            #5

            tsk tsk tsk u so bored that you do that??? ;)


            situations to avoid #37:
            "good morning ... how many sugars do you take in your coffee ... and what was your name again?"

            coming soon: situations to avoid #38: "...and the dog was there too?"

            J 1 Reply Last reply
            0
            • L l a u r e n

              tsk tsk tsk u so bored that you do that??? ;)


              situations to avoid #37:
              "good morning ... how many sugars do you take in your coffee ... and what was your name again?"

              coming soon: situations to avoid #38: "...and the dog was there too?"

              J Offline
              J Offline
              Joaquin M Lopez Munoz
              wrote on last edited by
              #6

              u so bored that you do that??? As you seem to do as well, I guess :) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

              1 Reply Last reply
              0
              • B Braulio Dez

                Oye Joaquin no paras tio !, estás hecho un máquina ;-)... Me parece que Chris debería de darte una camiseta de codeproject por la colaboración que haces... Un saludo Braulio

                T Offline
                T Offline
                Tom Archer
                wrote on last edited by
                #7

                Y yo? Necisito camisas tambien :) Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

                B 1 Reply Last reply
                0
                • T Tom Archer

                  Y yo? Necisito camisas tambien :) Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

                  B Offline
                  B Offline
                  Braulio Dez
                  wrote on last edited by
                  #8

                  Coño !, más gente q habla español !, divertido :-) Vamos a hacer unas lista de camisetas para Chris ;-) Un saludo Braulio

                  T 1 Reply Last reply
                  0
                  • B Braulio Dez

                    Coño !, más gente q habla español !, divertido :-) Vamos a hacer unas lista de camisetas para Chris ;-) Un saludo Braulio

                    T Offline
                    T Offline
                    Tom Archer
                    wrote on last edited by
                    #9

                    Para mi la unica gente que deben recibir camisas son la gente que escribe libros o son amigos de la gente que escriben libros :laugh: Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

                    B 1 Reply Last reply
                    0
                    • T Tom Archer

                      Para mi la unica gente que deben recibir camisas son la gente que escribe libros o son amigos de la gente que escriben libros :laugh: Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

                      B Offline
                      B Offline
                      Braulio Dez
                      wrote on last edited by
                      #10

                      Todos somos buenos amigos de la gente que escribe buenos libros :-) Una pregunta, por curiosidad, ( la escribo en español, pero si no la entiendes te la escribo despues en inglés). Es muy duro escribir un libro ?, Me refiero a si es una tarea a la que te tienes que dedicar 100 %. Como funciona ese mundo ? ( yo creo que nunca me atreveré a escribir un libro, pero tengo curiosidad por saber como es). Un saludo ! Braulio Inside Málaga# Sunny Beach ;-)

                      T 1 Reply Last reply
                      0
                      • B Braulio Dez

                        Todos somos buenos amigos de la gente que escribe buenos libros :-) Una pregunta, por curiosidad, ( la escribo en español, pero si no la entiendes te la escribo despues en inglés). Es muy duro escribir un libro ?, Me refiero a si es una tarea a la que te tienes que dedicar 100 %. Como funciona ese mundo ? ( yo creo que nunca me atreveré a escribir un libro, pero tengo curiosidad por saber como es). Un saludo ! Braulio Inside Málaga# Sunny Beach ;-)

                        T Offline
                        T Offline
                        Tom Archer
                        wrote on last edited by
                        #11

                        Braulio Díez wrote: Todos somos buenos amigos de la gente que escribe buenos libros Oh si, claro! Ahora! Pero que paso en escuela? :) Braulio Díez wrote: Es muy duro escribir un libro ?, Me refiero a si es una tarea a la que te tienes que dedicar 100 %. Cono mijo. No puedes imaginar. Es ridiculo a veces. La cosa es que los publisher no quieren intender que muchas veces estamas escribiendo en algo que esta in beta y no funciona bien. Tampoco no tiene instrucciones ni nada. Pero ellos todavia esperan que nosotros comple con las fechas. Muchas veces el resultado es que tenemos que avanzar y terminar algo que sabemos no es nuestro mejor trabajo. En terminos de horas, si toma un monton de tiempo escribir un libro y los publisher actua como el libro es tu unico trabajo cuando normalmente es algo que hacemos en la noche. Te digo, no es un trabajo facil. Pero la cosa es que me gusta ayudar a la gente y en eso recibo me pago. Cheers, Tom Archer Author, Inside C# Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.

                        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