Need help with a dynamically allocated object inside another class

This is a discussion on Need help with a dynamically allocated object inside another class within the C++ Programming forums, part of the General Programming Boards category; Hi i have wrote a program that creates objects of another class in the class it self, and I want ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    48

    Need help with a dynamically allocated object inside another class

    Hi


    i have wrote a program that creates objects of another class in the class it self, and I want to be able to save data to the objects I have created, from the class that created them. How can I do this?

    THank You

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The same way you would do it anywhere else -- using the methods of the class that you created. (Perhaps you put parameters in the constructor, perhaps using setThis, or setThat, or whatever.)

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,659
    By 'save', I assume you mean 'save as a file'?



    ITSA
    Socket Library!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with FIFO QUEUE
    By jackfraust in forum C++ Programming
    Replies: 23
    Last Post: 04-03-2009, 08:17 AM
  2. Using bitset class inside another
    By Dhekke in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2005, 06:50 AM
  3. Replies: 3
    Last Post: 12-03-2001, 12:45 PM
  4. Exporting Object Hierarchies from a DLL
    By andy668 in forum C++ Programming
    Replies: 0
    Last Post: 10-20-2001, 01:26 PM
  5. Replies: 4
    Last Post: 09-12-2001, 02:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21