How to make a ."something" command in c++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Xillez
    New Member
    • Jul 2013
    • 93

    How to make a ."something" command in c++

    Hey!, it been a long time since last time and this time it's an AI script for a rocket probe... I need a subcommand like:
    Code:
    something.something();
    underneath the main commands... but how do I set these up in the class?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You need a class declaration with something() as a public member function.

    Then you create an object of this class, say obj, then you can code obj.something() .

    You may want to spend a little time reviewing the details of this.

    Comment

    • Xillez
      New Member
      • Jul 2013
      • 93

      #3
      can you send me a link to any tutorials? if you could do that would be awsome... thanks for you help!

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        There's no point in doing that. If you Google "c++ tutorial" you will get links to over 17,000,000 pages.

        Comment

        Working...