Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Array of pointe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 13 Topic 43697 of 47561
Post > Topic >>

Array of pointers + memory Location

by Slain <Slain.k@[EMAIL PROTECTED] > Mar 5, 2008 at 06:38 AM

I have more of a conceptual question now. Let us say I do this:-

char *str[10]; --> create an array of pointers
str[1]= "John";

I thought this would automatically put John at some memory space and
point str[1] to it.
My colleague argues that in flat bed memory this should not be done. A
new should be used to allocate the memory and then point to it. Of
course he didnt do the best job explaining, hence my question to you
guys, if you can shed some more light on this.

Thanks in anticipation
 




 13 Posts in Topic:
Array of pointers + memory Location
Slain <Slain.k@[EMAIL   2008-03-05 06:38:40 
Re: Array of pointers + memory Location
Nick Keighley <nick_ke  2008-03-05 06:44:59 
Re: Array of pointers + memory Location
"Victor Bazarov"  2008-03-05 09:57:14 
Re: Array of pointers + memory Location
Jeff Schwab <jeff@[EMA  2008-03-05 09:09:35 
Re: Array of pointers + memory Location
Micah Cowan <micah@[EM  2008-03-05 09:38:04 
Re: Array of pointers + memory Location
Slain <Slain.k@[EMAIL   2008-03-05 07:07:43 
Re: Array of pointers + memory Location
Slain <Slain.k@[EMAIL   2008-03-05 07:07:56 
Re: Array of pointers + memory Location
James Kanze <james.kan  2008-03-06 01:24:43 
Re: Array of pointers + memory Location
utab <umut.tabak@[EMAI  2008-03-06 04:07:36 
Re: Array of pointers + memory Location
Pete Becker <pete@[EMA  2008-03-06 07:59:28 
Re: Array of pointers + memory Location
utab <umut.tabak@[EMAI  2008-03-06 04:13:10 
Re: Array of pointers + memory Location
utab <umut.tabak@[EMAI  2008-03-06 05:38:46 
Re: Array of pointers + memory Location
Triple-DES <DenPlettfr  2008-03-06 07:09:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 3:49:22 CDT 2008.