[HELP] Assign constants to an arrays of variable
Hey, guys! I don't know if my termins are right, but I guess so. Now on the problem. Let's say I have three constants - const1, const2 and const3. And I want to assing them to arrays in one variable. Like the first array of the var should be equal to the first const, the second array to be equal to second const and etc. I don't even know if that's possible, but if it is, I would want to know the way. Let me show you what I've tried:
PHP Code:
|
Re: [HELP] Assing constants to an arrays of variable
So you are trying to use pointers? If you provided information about what you are actually trying to do, a better solution could probably be found (aka The XY Problem).
|
Re: [HELP] Assing constants to an arrays of variable
Hmm, thread title needs a little repair.
|
Re: [HELP] Assign constants to an arrays of variable
The whole story is that I want to use the different constants as one variable with arrays in a loop, where to loop between the arrays of variable. I say again, maybe this what I call 'array' is not the same as what it means, but i mean the [32] after the var for example (think these were vector cells, but noe pretty sure). So, I need to use different const names in a loop, which are in one variable, and Variable[0] will be const1, Varriable[1] will be const2, etc. I'm not sure if this is possible.
|
Re: [HELP] Assign constants to an arrays of variable
If this is true, you have to use a string function in order to change strings around (like strcopy)
|
Re: [HELP] Assign constants to an arrays of variable
To beging with, you are trying to assign 2D array (const) to 1D array(Consts)
PHP Code:
|
Re: [HELP] Assign constants to an arrays of variable
Okay. Let me explain more. I want to put three consts into one variable with three vector cells. Maybe if I make the variable with two arrays (I mean two [][]) and put in the frist 3 vector cells, because the consts are three, and in the second vector cells I will have to put the size of each const. But it's only one array (the second []), when I have to put different sizes of consts for the three different consts in the first array (which is [3]). Like when the first array is [0], the second to be [sizeof const1], when the first array is [1], the second to be [sizeof const2]. Don't know how to explain it, but I want to get the different const name when the vector cell of the variable is different. For the different cell to result a different const. Again, don't know if this imaginated method is possible.
|
Re: [HELP] Assing constants to an arrays of variable
Quote:
|
Re: [HELP] Assign constants to an arrays of variable
Don't know snything 'bout that XY problem. :D Can someone explain, or it is still unsolved?
|
Re: [HELP] Assign constants to an arrays of variable
Quote:
|
| All times are GMT -4. The time now is 09:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.