>asked to write linked lists in C++
>can't do it
should I kill myself?
Yes.
Or you could go out and learn how to do it, instead of shitposting on /g/.
yeah pls do
this is literally babbys first data structurestruct node {
void *data;
struct node *next;
}
>>59739740
it's hard
pointers and references confuse the shit out of me
>>59739740
/thread
>>59739762
pointers point to and references give refernce
simple stuff desu
>>59739740
Have you ever tried implementing template-based linked lists? Shit's hard, especially if you can't use smart pointers. Really hard.
>>59739755
also
struct list{
node* head;
node* tail
};
>>59741079
you mean liketemplate<typename T>
struct ListNode{
T data;
ListNode* next;
};