Here's what I want to do:
I have data contained in "Asn_t" which is in header file "task.h".
I want to pass this data into the container "PathCont_t" in the Data_t struct which is located in the file "navigate.h". How can I do this? I have an example of the data structures below...I just can't figure out how to pass the data.
Thanks in advance!
Code://File task.h class TASKS { public: struct Path_struct { int Packet_Type; int sending_location; char sending_sign[10]; int rcv_location; path_struct path_data; Path_struct() : Packet_Type(Path_Type) {} }; // Types of assignments that can be sent over a network enum AsnType_t { PATH }; // message received over a network struct Asn_t { // Type of assignment received AsnType_t type; PATH_struct Path_Data; }; // Container type for assignments received. typedef std::vector<Asn_t> AsnCont_t; }; // end class TASKS //File navigate.h class PATHS { public: // Max number of Paths enum {MAX_PATHS = 10}; /// Path type. typedef std::vector<unsigned> Paths_t; /// Path type that contains the name of the Path. struct Path_t { std::string name; PathPts_t points; }; /// Container of Paths. typedef std::vector<Path_t> PathCont_t; struct Data_t { // All Paths for the exercise. PathCont_t Paths; Data_t() : Paths(MAX_PathS) {} }; }; // end class PATHS