Versetti Posted January 3, 2004 Report Posted January 3, 2004 I made a link list for my save location bot. What is does it save the data too a file using the _write command and reads it using the _read command. The problem is I think when the bot tries too add the data the username gets screwed up in the process. I want too know how would I set the list value ListPtrV->Pname to the value of char Pnametemp[32]; here is what I have so far:void savepAdd(char Pnamefd[32],long xcfd,long ycfd,int shipfd) { Uid++; ListPtrV=new savep1; ListPtrV->Userid = Uid; strcpy(ListPtrV->Pname,Pnamefd); //ListPtrV->Pname = (char*)&Pnamefd[0];//above command does not work yet ListPtrV->xCoord1 = xcfd; ListPtrV->yCoord1 = ycfd; ListPtrV->Pship1 = shipfd; ListPtrV->Next = 0; if (LastPtrV) LastPtrV->Next = ListPtrV; else FirstV = ListPtrV; LastPtrV = ListPtrV; }if you know how too fix it pls post.........
Recommended Posts