is it ok to use global str ?
#1

on top

new GlobalStr[1024]

so its ok if i use that str to all format(GlobalStr,sizeof(GlobalStr)
?
Reply
#2

Yes.....
Reply
#3

No, you shouldn't, because it doesn't need to be, and it can cause problems. You should only make variable global if they NEED to be global, not just because it's easier.
Reply
#4

Length 1024 is useless memory use.
So I think you should make a new string every time you need it.
Reply
#5

It's not just about memory usage. Strings can become lost - replaced by others.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)