>mfw before having to use pointers in C and after
I-I don't like pointers
>>60473747
it gets easier anon
...no it doesn't
get out now
leave this place
>>60473747
> he doesn't like pointers
Pointers make your life easier anon
>>60473810
...if you're a brainlet
Why are pointers considered so difficult? They're dead simple once you understand the underlying mechanism
>>60473747
It's just a tool access specific memory locations. What's so hard to understand?
>cant into smart pointers
>cant into RAII
>allocate from stack instead of heap
>cant into MMM
fuck my life /g/
ill forever be a brainlet
>>60473893
you should always allocate on the stack unless you have a good reason for using the heap
>>60473747
Pointers are the ultimate scrub filter. Can't figure out pointers? Get out. Can't use pointers in a real project? Get out. Can't use pointers in a 20,000+ line project? Really get out.
>>60473747
pointer = memory address
that's it
if pointers scare you then you've never worked outside of memory protected enviroments
>>60473747
>mfw garbage collection
using raw pointers is the cancer that killed C++
>>60473747
I was like you OP about two months into learning C. Then my instructor explained it and they are easy. An * always dereferences a memory address to the expected type. A & in front of a variable is referring to the address.int my_num = 0; //Standard signed integer
int *num_ptr = NULL; //A datatype used to store the LOCATION of an integer
num_ptr = &my_num;//the pointer data type now points to the ADDRESS of the integer
//De-reference the pointer and it's treated like a standard integer
*num_ptr = *num_ptr + 2;
printf("%d\n", *num_ptr);
>>60473747
>Not liking pointers
>Not being a faggot
Pick one