ANON, STOP DICKING AROUND. Can you tell me why someone might use a pointer in a project?
No cheating, my prof cant even define a pointer. its kinda sad
>polite sage, because I don't want anyone to catch me spoonfeeding OP
a regular variable is usually a fixed amount of bytes in memory, starting at a certain index in memory.
during a function call you may not want to pass the whole data object you're dealing with, as those become kinda large and hard to deal with. instead you want to pass a pointer to that data object. This pointer is (in C, at least) simply an integer value, describing the location of your data in the process's virtual memory.
Due to the pointer being a fixed length int, it becomes much easier to pass around than, say an array of 1000 characters or a binary tree.
>>54720162
Lol dude that's so, like 1990, just use java like us all.
hahaha.
Wanna go eat curry later ladeh?
>>54720246
If that is the case, why not simply pass the address of the array/btree?
>>54720312
That's what the pointer is....
>>54720162
Hacking bruh
Dynamic memory of any sort
Linked data structures (linked lists, trees, graphs)
Pass by reference semantics
Callback functions
All of these require pointers.
>>54720586
Yo nigga, you knew ruby innit?
Ruby on rails good?
>>54720601
I know Ruby, but I don't really do web development, and I don't know much of Rails, except for the fact that it's a bit bloated. Try it yourself if you're curious. Or just use Sinatra, which is easy to work with.
>>54720162
Say you want to pass a string to a function in C. You pass a pointer to it as an argument. That way the function can modify whatever the pointer points at and modify the source string. Also linked lists, trees, all use pointers. Anything that requires referencing really.
>>54720312
Are you fucking retarded?
>>54720162
Who is this hijabi qt?