So on lines 36 - 39 (The commented out functions) is where I'm sure is causing this error because once I don't comment them out pretty much everywhere Flink or Rlink is used or defined I get this error. Any ideas as to why?
#include <iostream>
#include "Nodes.h"
usingnamespace angeles_1A;
usingnamespace std;
int main()
{
dnode *p;
dnode test;
p = &test;
// Inserts link at head
test.list_head_insert(0,p);
// Inserts values into the link list
for(int i = 0; i < 6; ++i)
{
test.list_insert(p, i);
}
test.set_xy(2,5);
test.print_items(p);
return 0;
}
These functions are the problem as you suspected. What you're doing here is trying to return the address of "Flink" and "Rlink" (yes, functions have addresses in memory). Logic dictates that your error is due to ambiguous symbols. In addition, the compiler will refuse the conversion from a pointer to a member function to a "dnode" pointer.
You need to rename either the data-members or the member functions; common practice is to give data-members a special prefix or suffix so that they are easily identified, like so:
1 2 3 4 5
struct Structure
{
int MData_Member; // 'M' prefix
int Data_Member_; // '_' suffix
};
Member functions don't have these naming conventions.