Message from C, C++ discussions

January 2020

— SolderingCurrent = current;

— 

Both are pointer to Node. this statement does is solderingCurrent is now pointing to same location as current right? how can i make a copy of current and solderingCurrent should point to that copy

— Node is a struct which contains a struct and pointer to next struct

— Auto solderingCurrent = new Node(*current);

— On C plz

— Node * solderingCurrent = malloc(sizeof(Node));
memcpy(solderingCurrent, current, sizeof(Node)); // Or some other operations for copying

Message permanent page

— It isn't solving

— When I print from solderingCurrent node it's printing only the last node

— Please show me the complete code.

— Yes wait a sec.

— C option outputs soldering node which supposed to oputput first and second

— And j output node from current which i call current node