|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: pointer versus array?
============================================================ "So many interesting emails. So little time to read them. Thanks to myTopica, I can find what I want, when I want it." So can you. http://click.topica.com/caaabBCbUrGczbU68iFa/register ============================================================ Strings aren't a basic data type in C/C++. You'll have to use strcpy() or something equivalent. -Greg ----- Original Message ----- From: "russ" <nupc@nupc.org> To: <gameprogrammer@topica.com> Sent: Monday, April 02, 2001 9:34 PM Subject: pointer versus array? > ============================================================ > Searching for "a clean, well-organized place" for email? My > Topica was designed with people like you in mind. Stop by > and see what you think at > http://click.topica.com/caaabBzbUrGczbU6XLXa/register > ============================================================ > > hi guys, > > i have a little problem: > > class person > { > private: > char name[ 50 ]; > > public: > void setName( char string[] ) > { name = string; } > . > . > . > }; > > gives me the error; > error C2440: '=' : cannot convert from 'char []' to 'char [50]' > > i need the private variable to be an array, what kind of argument do i > need on setName() so that this will work. > > i know it's probably a simple pointer issue, and there are many pointer > gurus on this list, and i thank you for any help > > russ > > > -- > www.russelldsmith.freeservers.com > > > ==^================================================================ EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrGcz.bU68iF Or send an email To: gameprogrammer-unsubscribe@topica.com This email was sent to: list@pendleton.com T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01 ==^================================================================
|
|