Server Help

General Questions - Biller Code help

Versetti - Tue Jan 06, 2004 8:36 pm
Post subject: Biller Code help
I got a problem in my link list let me show you the code for it:
Code: Show/Hide
class boardUdata{
public:
   int UserID;
   char Name[32];
   char Email[100];
   char Sig[256];
   char title[32];
   int posts;
   int warnlevel;
   int Level;
   bool banned;
   bool limitread;
   boardUdata* Next;
};

class UdataNode{
   boardUdata *item;
   UdataNode *prev;
   UdataNode *next;
};

class UdataList{
   UdataNode *head;
   UdataNode *tail;
   void replace12(char,char);
};

that is the link list part and when I try too add the void replave funcation it shows a error here is the funcation:
Code: Show/Hide
void UdataList::replace12(char oItem[32],char nItem[32])
{
   UdataNode *parse = head;               //Move to head of node list
   while(parse)                        //While the nodes are existant.
   {
      if(parse->item->Name = oItem)         //Match the node's item with the undersired item.
      {
         parse->item->Name=nItem;         //Replace the item.
         return;                        //Skip out to prevent removing too many.
      }
      parse=parse->next;
   }
}


and the error I got was:
Quote:
--------------------Configuration: SSG Biller - Win32 Debug--------------------
Compiling...
main.cpp
d:\c++ projects\ssg biller\disscussion.h(428) : error C2511: 'replace12' : overloaded member function 'void (char [],char [])' not found in 'UdataList'
d:\c++ projects\ssg biller\disscussion.h(2icon_cool.gif : see declaration of 'UdataList'
Error executing cl.exe.

SSG Biller.exe - 1 error(s), 0 warning(s)


Plz help me with this I'm trying too get it working for like 5 days now.
Cyan~Fire - Tue Jan 06, 2004 10:56 pm
Post subject:
I think the problem is that 'char' by itself is a value, but 'char []' is a pointer. Your function declaration is asking for 2 values, but the implementation is asking for 2 pointers. Try replacing your declaration with "void replace12(char*,char*);" and it should work.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group