NEED HELP URGENTLY !!!!

Home Forums C Programming NEED HELP URGENTLY !!!!

Viewing 2 reply threads
  • Author
    Posts
    • #2106
      Anonymous
      Inactive

      hi to whoever reading this. I’m a complete noob to c++ so bare with me if it’s a simple question.
      So, here goes my question:

      What does the question mean by: implementing getter with const method?? Can anyone of you give me an example to this question??

      Thanks

    • #3399
      Humayan
      Participant

      Do you mean a constant method of a class implementation? A constant member function of a class is a function that does not alter any class data members , like:
       
       

       check out this link: http://www.uwyn.com/resources/uwyn_cpp_coding_standard/x496.html

    • #3400
      Anonymous
      Inactive

      Thanks cman! Actually i was kinda confuse on where to put the “const”
      For example:

      what’s the difference between putting the “const” in front and at the back?
       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
error

Did you find this post useful? Please consider sharing with your friends and colleagues:)