How to save text in variable?
#2

Quote:
Originally Posted by Supermaxultraswag
Посмотреть сообщение
Код:
new Text[4]={"Nice"};
How do I save text in same variable later?

if I do this

Код:
Text[4]={"Nice"};
I get

error 032: array index out of bounds
You are not leaving a 'slot' for the NULL terminator.

It should be:

PHP код:
new Text[5] = "Nice"
Could also be written as:

PHP код:
new Text[5] = {'N''i''c''e''\0'}; 
Reply


Messages In This Thread
How to save text in variable? - by Supermaxultraswag - 07.11.2015, 17:38
Re: How to save text in variable? - by ThePhenix - 07.11.2015, 17:44
Re: How to save text in variable? - by Supermaxultraswag - 07.11.2015, 17:53
Re: How to save text in variable? - by AbyssMorgan - 07.11.2015, 18:09
Re: How to save text in variable? - by Supermaxultraswag - 07.11.2015, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)