User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 392,304 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,849 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:

C++ reading,writing,displaying a file?

Join Date: Jul 2005
Location: London
Posts: 164
Reputation: Stoned_coder is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 5
Stoned_coder Stoned_coder is offline Offline
Junior Poster

Re: C++ reading,writing,displaying a file?

  #4  
Sep 6th, 2005
its not a string. I mean you will need a constructor that can create enough memory to hold the array passed to your class and somehow copy the array to it. a constructor taking an int* and an int seems to fit the bill perfectly. an int member size and an int* member ptr kinda suggests that your teach wants you to use dynamic allocation and make your member funcs act on the object itself and not on passed in params. Remember when dealing with dynamic allocations it is important to consider copying operations carefully and also destruction.
Reply With Quote  
All times are GMT -4. The time now is 10:03 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC