A
Angela
//array notation works***********
char temp[]
for(int x=0; x<strlen(temp); x++)
{ temp[x]=(temp[x]*2); } //simple char encoding
//how do I do the same thing with pointer notation**********
char* temp
while( *temp )
{ *temp++= (*temp)*2; } //simple char encoding
I have played around with this and usually it just erases the first
few letters. If I wanted to do something like this with a C++ string,
is this possible?
char temp[]
for(int x=0; x<strlen(temp); x++)
{ temp[x]=(temp[x]*2); } //simple char encoding
//how do I do the same thing with pointer notation**********
char* temp
while( *temp )
{ *temp++= (*temp)*2; } //simple char encoding
I have played around with this and usually it just erases the first
few letters. If I wanted to do something like this with a C++ string,
is this possible?