convert Linked list in C++ to C
Hellow everyone,
I have a problem in converting a C++ code to C.
Code:
struct node
{
int id;
string name;
int idP;
string nameP;
double price;
int unit;
node *nextC; //idk how to convert to c
};
node *temp; //idk how to convert to c
node *headC = NULL; //idk how to convert to c
then, there are a part that using this.. which is :
Code:
temp = new node;
temp-> id= tempid;
temp->name= tempname;
temp-> idP= tempidP;
temp->nameP= tempnameP;
temp-> price= tempprice;
temp->unit= tempunit;
temp-> nextC = headC;
headC= temp;
please help :( I totally no idea how to convert them.. TT