|
-
Sep 16th, 2004, 05:59 AM
#1
Thread Starter
Addicted Member
Custom array item names Like PHP (array[item]) but in C
in php you can make an array item like this $bob["hello"] instead of having to use $bob[0] is this possible in classic ansi C ?
thanks for ya help people
-
Sep 16th, 2004, 06:03 AM
#2
Fanatic Member
Nope, it's not possible.
(In case you're still interested, you can use the Map template class from the Standard Template Library to achieve the same effect.)
-
Sep 16th, 2004, 08:22 AM
#3
(But only in C++. In C, you have to use a procedural implementation of a map, if you can find one. Oh, and the STL map is called map, not Map.)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Sep 16th, 2004, 08:36 AM
#4
Thread Starter
Addicted Member
K thanks people just wanted to know cos im working on converting this to c from php
will just have to change my approach
thanks again
senorbadger
-
Sep 16th, 2004, 08:38 AM
#5
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|