Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Shift damn you.

Name: Anonymous 2010-09-01 22:45

So, im writing a c++ program and i have it all done encept for some reason i cannot get the idea behind shifting a string down.
so i was wondering how you code to get
abc...yz   to become
bcd...za?

Name: Anonymous 2010-09-02 4:17

void shift_str(char *str) {
 char a = str[0];
 int l=strlen(str);
 memmove(str,str+1,l);
 str[l]=a;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List