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

pointers in C

Name: Anonymous 2006-11-02 15:00

I have a little problem. way back in high school I took java, and never had to deal with these little things. now, at college, they're making me take C. I don't have anything against it, its just that.. well I'm not entirely sure what pointers are used for, or what they accomplish. would anyone care to elighten me?

Name: Anonymous 2006-11-02 17:44

void p(const string& s) { cout << s << endl; }
void p(const char *s) { cout << s << endl; }

int main() {
    string s = "lol noob";
    p(s);
    p(s.c_str());
    return 0; // you're the zero!
}

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