|
-
April 15th, 2007, 07:54 PM
#9
Re: Arrays of Strings- stumbling over a very basic question
 Originally Posted by anw
I thought I had done it before, but now can't find where.
Maybe you had done something like this before:
Code:
string addrs[] = { "localhost", "example.com", "etc" };
"type name[]" declaration is fine when you initialize the array in the same statement.
I had always thought, though, that var[] and var * were equivalent. Now I know better
Not quite, although depending on context they can be used interchangeably. For example as a function parameter it doesn't make a difference, except when multidimensional arrays are concerned.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|