Link to home
Start Free TrialLog in
Avatar of lapijn
lapijn

asked on

how to do this like it should ??

Hello,

I'm starting to learn how to program in c++.
I use now
for (inti=0,i<20,i++){string[i]=0x00;}
to "reset" a string to zero.

How is the correct way to do that ?

SOLUTION
Avatar of Andrey_go
Andrey_go

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use a char array, instead of string.

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapijn
lapijn

ASKER

thanks teuntje.
Avatar of lapijn

ASKER

OK, jaime_olivares. Thanks all.