Confusion With Array
Hi Guys,
I have a bit confession. Code:
new Array[2] //declared array so I do it this way Code:
Array[0] = 0 is there any other method to do this in 1 line?? |
Re: Confusion With Array
arrayset(Array, 0, sizeof(Array))
|
Re: Confusion With Array
Why not Array = 0?
|
Re: Confusion With Array
Because the compiler will not know that you want to set the entire array to 0 and is going to expect an index. You can only do that for a regular variable.
|
Re: Confusion With Array
Try this and tell me if it works.
new Array[2] = { 1, 2 }; Array = { 0, 0 }; |
Re: Confusion With Array
Quote:
|
Re: Confusion With Array
Quote:
Can anyone tell ho to do that ? |
Re: Confusion With Array
PHP Code:
|
All times are GMT -4. The time now is 11:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.