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. Calling function

Calling function

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 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.
  • C Offline
    C Offline
    cpvc
    wrote on last edited by
    #1

    Hi All I have a problem to call BOOL type function.I have declear a function in header file and calling in same header file.Then i am geting error

    error C3861: 'str': identifier not found

    Plz help me

    S 1 Reply Last reply
    0
    • C cpvc

      Hi All I have a problem to call BOOL type function.I have declear a function in header file and calling in same header file.Then i am geting error

      error C3861: 'str': identifier not found

      Plz help me

      S Offline
      S Offline
      santhoshv84
      wrote on last edited by
      #2

      Hi, First check did you declared the variable 'str'. Could you please show the function.

      The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V

      C 1 Reply Last reply
      0
      • S santhoshv84

        Hi, First check did you declared the variable 'str'. Could you please show the function.

        The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V

        C Offline
        C Offline
        cpvc
        wrote on last edited by
        #3

        yes

        public:
        bool str();

        and

        bool CCall::str()
        {
        AfxMessageBox("Hello");
        }
        return false;

        And i want to call str(); in .h file.

        D D 2 Replies Last reply
        0
        • C cpvc

          yes

          public:
          bool str();

          and

          bool CCall::str()
          {
          AfxMessageBox("Hello");
          }
          return false;

          And i want to call str(); in .h file.

          D Offline
          D Offline
          Daniel Kanev
          wrote on last edited by
          #4

          What I can see is this is a method of a class, not C-type function. You cannot call a method of a class that way. Either you should create an instance of the class or you should declare the method as static.

          1 Reply Last reply
          0
          • C cpvc

            yes

            public:
            bool str();

            and

            bool CCall::str()
            {
            AfxMessageBox("Hello");
            }
            return false;

            And i want to call str(); in .h file.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            cpvc++ wrote:

            return false;

            Did this return statement escape? :confused:

            "Love people and use things, not love things and use people." - Unknown

            "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

            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