[Solved] Handling Pointer To Array in Private Class.? [closed]


As far as I can understand from your comments in your question and answers, you are in a very bad situation: your instructor is BADLY USING THE WRONG TOOL TO DO THE JOB (It will be interesting if he read this site as well).

It is teaching you OOP using a non-OOP-pure language (like C++) teaching it you like it is Java, thus generating confusion.

So you end-up managing dynamic memory in the wrong way (new[] in ctor, but no dtor and hence no delete[] and no copy and assign – hence sharing of dynamic data and potential double deletion), having mysterious doubt about functions with parameter (respect to static memory (?!?) functions), with an instructor who never told about a basic standard class (like std::vector) but pretends you to use dynamic allocated arrays…

What to say? It’s HARD, VERY HARD.

My suggestion, is stop a while and try reading a more “industrial C++” based tutorial.
(This one can really be useful! but follow it page by page!)

1

solved Handling Pointer To Array in Private Class.? [closed]