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

Pages: 1-

Utility of pointers

Name: Anonymous 2012-12-18 10:10

Hi /prog/, i'm learning C and i can't find a reason for using pointers. I know how they work, but i developed some things and i never had to use it. Can you help?

Name: Anonymous 2012-12-18 10:15

Take a data structures course and you'll understand.

Wait, no. Try modifying a variable with a void function, you can't do it without pointers.

Name: Anonymous 2012-12-18 10:22

I didn't studied voids yet, i'm studying C since a week. :/

Name: Anonymous 2012-12-18 10:32

I'm going to die.

Name: Anonymous 2012-12-18 10:51

>>4
Good news, everyone!

Name: Anonymous 2012-12-18 14:20

Pointers considered harmful, use references or std::auto_ptr which will give you std

Name: Anonymous 2012-12-18 15:07

NEVER use sepples garbage like references or std::auto_ptr. NEVER.

Name: Anonymous 2012-12-18 15:15

NEVER use sepples. NEVER.

Name: Anonymous 2012-12-18 15:16

>>7
It wouldn't exist without reason, you igornant fool

Name: Anonymous 2012-12-18 15:36

>>9
Why do niggers and Jews exist?

Name: Anonymous 2012-12-18 16:54

>>10
to rape us and steal our money.

Name: Anonymous 2012-12-18 16:57

Don't use std::auto_ptr, but std::unique_ptr is pretty much needed.

Name: Anonymous 2012-12-18 17:02

The /d/ programming language.

Name: Anonymous 2012-12-18 17:08

>>2

Try modifying a variable with a void function, you can't do it without pointers.

Easily, if it's a global variable.
Or I can make that function non-void, what's the reason not to return something.

Name: Anonymous 2012-12-18 17:42

Easily, if it's a global variable.
Well, aren't you quite the nigger.

Or I can make that function non-void, what's the reason not to return something.
If you do something like

int modify_no_pointers(int nigger) {
    return nigger++;
}

int main() {
     int nigger = 5;
     ...
     nigger = modify_no_pointers(nigger);
}
...

Then you'd be cheating.

Name: Anonymous 2012-12-19 4:49

>>10
Niggers and jews were put on Earth by Satan to torment slightly autistic nerdy whites who can't fight back due to being fucking pussies.  Same with C++.  Bjarne Stroustrop is an obvious demonic name.

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