 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
MR Guest
|
Posted: Wed Feb 15, 2006 7:03 am Post subject: How to write 'typedef char *t_char_ptr; char **char_ptr_ary= |
|
|
Trying to create an array of 'char *' with new I failed trying it with
char **char_ptr_ary=new (char *)[10];
Instead I had to do this in two lines which finally succeeds:
typedef char *t_char_ptr;
char **char_ptr_ary=new char_ptr[10];
[out-of-memory-recapitulation]
Ok, that works fine, but is there really no way to express this in a
single statement?
Thanks,
Michael |
|
| Back to top |
|
 |
Dennis Jones Guest
|
Posted: Wed Feb 15, 2006 8:03 am Post subject: Re: How to write 'typedef char *t_char_ptr; char **char_ptr_ |
|
|
<MR> wrote in message news:ruh5v19erolg4reb80cq6uoualj8ur44u2 (AT) 4ax (DOT) com...
| Quote: | Trying to create an array of 'char *' with new I failed trying it with
char **char_ptr_ary=new (char *)[10];
Instead I had to do this in two lines which finally succeeds:
typedef char *t_char_ptr;
char **char_ptr_ary=new char_ptr[10];
[out-of-memory-recapitulation]
Ok, that works fine, but is there really no way to express this in a
single statement?
|
This works (no parens):
char **char_ptr_ary=new char *[10];
- Dennis |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|