R
R
Ratyk_ss2020-05-26 15:52:26
C++ / C#
Ratyk_ss, 2020-05-26 15:52:26

Classes, calling methods?

//Here is an instance of the Team class

class Competition {
  private:
    Team team[20];
        public:
    void Set(string _name, string _kind_of_sport, int _number_of_teams, string _date, string _location);


class Team {
  public:
    void TeamChange();
}

Is it possible to access the methods of a class whose instance is in another class?

Something like:
Competition comp;
comp.team.TeamChange();


Question about class methods

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Bukharev, 2020-05-26
@evgenybuckharev

It is possible, only you clearly confused the syntax of the php language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question