Well, no one has replied yet. Someone else has helped me...kinda. He send me this code, but has yet to explain what it all does. He made changes and I was wondering if anyone could explain why he changed what he did. Or, tell me how you would change the code to make it work for you and why.
Waiting for any response...Code://Class Music #include <iostream> #include <string> struct songs { std::string songName; std::string lyrics; }; struct cds { std::string title; songs song[25]; }; class m { public: void SetGroup(char*); char* Get(); private: std::string group; cds cd[50]; }; void m::SetGroup(char* igroup) { group = igroup; std::cout << igroup << '\n' << group.c_str(); } char* m::Get() { return group.c_str(); } int main() { m music[3]; char* hey = "Senses Fail"; music[0].SetGroup(hey); std::cout << music[0].Get(); std::cin.get(); return 0; }
-Ep




Reply With Quote