karmaPolice
Programmer
I have a problem, I have to use C++ and ASM to make a program, here is the description:
I have to make a program in C++ that creates a Linked List of doubles and then in ASM using the list just add every number on it. That's all.
I have the C++ part, I just don't know how to advance through the linked list
The ASM prototype should be:
addDoubles(List l, int listSize);
and here is the C++ part, just the important:
Thanks
I have to make a program in C++ that creates a Linked List of doubles and then in ASM using the list just add every number on it. That's all.
I have the C++ part, I just don't know how to advance through the linked list
The ASM prototype should be:
addDoubles(List l, int listSize);
and here is the C++ part, just the important:
Code:
class node {
void* info; //info could be int, double, char, etc.
node* next;
public:
node (void* v) {
info =v;
next=0;
}
void poner_next (node*n){
next = n;
}
node* read_next(){
return next;
}
void* read_info(){
return info;
}
};
class list{
node* header;
int node_num;
public:
list(){
node_num = 0;
header = 0;
}
void remove(int);
void insert (void*, int);
void put (void* v){
insertar (v, node_num+1);
}
void* find(int);
void print();
};
Thanks