|
-
September 20th, 2010, 06:05 AM
#1
A Variable variable name?
Hi guys!
I'm looking for a way to get something like this running: i want to pass to a function a argument whose name would be variable. A little more specific: there's this function
Code:
LoadSomething(int nvm, int hereWeAre)
- it loads some graphics based on variable hereWeAre - basicly passing hereWeAre to the function would load graphics hereWeAre.bmp. Unfortunetaly I have hundreds of graphics to load so i want to do it in a loop - but here the problem appears: I dunno how to make the progam evaluate, lets say, a string variable saying hereWeAre2 so i can pass the value of the string as the name of the integer var needed in this function.
Dunno if i made the problem clear enough. But hope someone can tell me if this is possible.
Thanks,
Sakurazuka
Last edited by sakurazuka; September 20th, 2010 at 06:07 AM.
Reason: [code]
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
|