struct NodeType
{
  char name[MaxNameSize];              
  NodeType* next;                    // A pointer to the next person in line
};
 
void GetInLine(char new_person[]);
 
int main(void)
{
  char X[MaxNameSize];
  Q q1;
  q1.GetInLine("Joe");  
 
void Q::GetInLine(char new_person[]) // This function causes a person
                // to get in line in the appropria spot.

{
  NodeType* temp;
  temp=new NodeType;
  temp->name=new_person[];
  temp->next=Front;
  Front=temp;

}

my error in here is in a definition of GetInLine
139 C:\Documents and Settings\mauro\Desktop\ass4.cpp expected primary-expression before ']' token
What is that mean

>> temp->name=new_person[];
Is that line 130? You can not assign char arrays like that. You have to use strcpy() instead, like this:

#include <cstring>
<snip>
strcpy(temp->name,new_person);

>> temp->next=Front;
>> Front=temp;

Circular reference -- is that what you really want ? It results in Front->next == Front, and you have lost all other nodes that may have been in that linked list.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.