Posts: 23
Threads: 9
Joined: Jan 2014
Reputation:
0
on top
new GlobalStr[1024]
so its ok if i use that str to all format(GlobalStr,sizeof(GlobalStr)
?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
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.
Posts: 1,578
Threads: 15
Joined: Feb 2013
Reputation:
0
Length 1024 is useless memory use.
So I think you should make a new string every time you need it.