Message from C, C++ talks

July 2019

— Explain

— I made a pointer pointing to head so that I can traverse the list

— Oky

— Point is pointing to head right?
So it should traverse the list and point->next should store in point..

Any mistake here?

Message permanent page


Question 1 memory leak
head addr is 0xabcd....
Node *point = new Node();
(if point addr is 0x12345......)
point = head;
(point addr change is 0xabcd)
how release 0x12345...?

— Question 2

— Where is init next point?

— So I need to dereference point to get value inside of head right?

— Https://

— ☺️

— Https://

— Delete

— Thanks!
But I want to write by own to learn
I won't open it until I solve mine 😂

— The best learn is reading😂

— printf("Sum of %d & %d is %d\n", A, B, C);