In article <65d7444f.0310050436.9c8c06c@posting.google.com> ,
cajmoney@cs.com says...[color=blue]
> Hello I am taking a class in advance C++ and I need some help. My
> problem is when I construct a object class I have to use a non member
> function to allow the user to enter their name and store that name in
> a local array.[/color]
Why would you have to do that? First of all, you probably want to use a
string instead of an array. Second, the code to construct the object
_should_ normally be in the ctor.
[color=blue]
> I cannot figure out how to pass that array into my
> object class so I can display it to the screen.[/color]
You can't pass an array as a parameter directly. You can pass a pointer
to the beginning of an array, or you can pass a class/struct that
contains an array (though you'd generally prefer to pass a pointer or
reference to the latter).
[color=blue]
> I guess my question
> is: how do you return arrays from a function? How do you pass that
> array to a member function.[/color]
My question is: can you give a more complete description of what you're
trying to accomplish? It seems to me that you're asking us about a
detail that will probably disappear completely in a better design.
--
Later,
Jerry.
The universe is a figment of its own imagination.