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

halp (pointers)

Name: Anonymous 2007-11-25 18:06

i have the following function:

char * find(const char * s1, const char * s2)
{ /* whatever */ }

Inside I move the s2 pointer with *s2++; How do I reset *s2 to point at the beginning of the string? I tried to make a counter and do it like this:

int counters2 = 0;
(later)
*s2++;
counters2++;
(later)
s2-=counters2++;

but it says "cannot modify a const object". What do I do?

Name: Anonymous 2009-11-25 15:00

i am a virus. i ahev a long algorithm and i steal passwords out of your files w/ my code. if you dont repost this comment in 10 other threads i will break into your program tonight and dereference your null pointers

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