What is wrong with this code?

This is a code for a class assignment that I wrote. I am continually getting error messages. The messages are in comment sections. Can someone tell me please what I am doing wrong? It seems the more I fix, the more errors I get??? I hope I don't sound like too much of an idiot. I am trying my best with this.

#include
#include
#include

struct stud
{
int *id[4];
char cnum[8];
int sect[4];
int test[3];
int assn[6];
int asavg, tstavg, final, avg;

stud *left;
stud *right;
};

// function prototypes

void menu();
void create();
void insertnode(stud);
void searchtree (int);
void display();
void search(); // to find data


void main()
{
menu();
}

void menu()
{
int choice;

cout << "1. Input Student Data
";
cout << "2. Display Student Data
";
cin >> choice;

while (choice !=1 && choice !=2)
{
cout << "That is not a valid choice. Please re-enter 1 or 2:
";
cin >> choice;
}

switch (choice)
{
case 1: create();
clrscr();
break;
case 2: display();
clrscr();
break;
}
}

void create()
{
stud info;
int numstud, i, tcount=0, acount=0; //tcount and acount tally test/assn grades

cout << "How many students do you want to enter into the database? ";
cin >> numstud;

for (i=0; i> info.id;


cout << "Course Number - 7 characters:
";
cin >> info.cnum;
cout << "Section Number - 4 digits:
";
cin >> info.sect;
for (int t=0; t<=2; t++)
{
cout << "Enter test grade " << t+1 << ":"; //Enter 3 test grades
cin >> info.test[t];
tcount+=info.test[t];
}
for (int a=0; a<=5; a++)
{
cout << "Enter assignment grade " << a+1 << ":"; //Enter 6 assgn grades
cin >> info.assn[a];
acount+=info.assn[a];
}
cout << "Enter final exam grade: ";
cin >>info.final;

info.asavg=acount/3;
info.tstavg=tcount/6;
info.avg=(info.asavg+info.tstavg+info.final)/3;

clrscr();
insertnode(info);
}

}

void insertnode(stud data)
{
stud *nodePtr, *newnode, *root; //newnode - newnode; nodeptr traverses database
root=NULL; //root of tree


newnode = new stud;

/************************************ *******************************************
Here, I get this message:
The left side of an assignment operator must be an addressable expression. Addressable expressions include the following:
numeric or pointer variables
structure field references or indirection through a pointer
a subscripted array element

I am not sure what is meant by this. newnode->id IS a structure field reference through a pointer. I don't get the message with any of the other places that I've made this very similar assignment. Am I referencing the pointer wrong here?

************************************************************************************/
newnode->id=data.id;
newnode->left=newnode->right=NULL;

if (!root)
root=newnode;
else
{
nodePtr=root;
while (nodePtr!=NULL)
{
if (data.id < nodePtr->id)
{
if (nodePtr->left)
nodePtr=nodePtr->left;
else
{
nodePtr->left=newnode;
break;
}
}
else if (data.id > nodePtr->id)
{
if (nodePtr->right)
nodePtr = nodePtr->right;
else
{
nodePtr->right=newnode;
break;
}
}
else
{
cout << "This student is already listed in the database.
";
break;
}
}
}
}

void display()
{
int num;

cout << " Display Menu

";
cout << "To access student data, please enter the Student ID: ";
cin >> num;

clrscr();
searchtree(num);
}

void searchtree(int val)
{
stud *root;
stud *nodePtr=root;

while (nodePtr)
{

/************************************ *******************************************
Here I get the message that it cannot convert int to int - but both val and nodePtr->id are ints. Is it because nodePtr->id is a pointer? How do I fix this?
************************************************************************************/
if (nodePtr->id==val)
{
cout << "ID: " << nodePtr->id << endl;
cout << "Course Number: " << nodePtr->cnum << endl;
cout << "Section Number: " << nodePtr->sect << endl;
cout << "Assignment Grades:
";
cout << " Assgn 1: " << nodePtr->assn[0] << endl;
cout << " Assgn 2: " << nodePtr->assn[1] << endl;
cout << " Assgn 3: " << nodePtr->assn[2] << endl;
cout << " Assgn 4: " << nodePtr->assn[3] << endl;
cout << " Assgn 5: " << nodePtr->assn[4] << endl;
cout << " Assgn 6: " << nodePtr->assn[5] << endl;
cout << "Test Grades:
";
cout << " Test 1: " << nodePtr->test[0] << endl;
cout << " Test 2: " << nodePtr->test[1] << endl;
cout << " Test 3: " << nodePtr->test[2] << endl;
}
}
}

Comments

  • : This is a code for a class assignment that I wrote. I am continually getting error messages. The messages are in comment sections. Can someone tell me please what I am doing wrong? It seems the more I fix, the more errors I get??? I hope I don't sound like too much of an idiot. I am trying my best with this.
    :

    [blue]I formatted the code to see what was going on. I made changes in red. So far (not done yet) main should return an int. Also "int *id[4];" looks wrong. More later.[/blue]
    [code]
    #include
    #include
    #include

    struct stud
    {
    int *id[4];
    char cnum[8];
    int sect[4];
    int test[3];
    int assn[6];
    int asavg, tstavg, final, avg;

    stud *left;
    stud *right;
    };

    // function prototypes

    void menu();
    void create();
    void insertnode(stud);
    void searchtree (int);
    void display();
    void search(); // to find data


    [red]int [/red]main([red]void[/red])
    {
    menu();
    return 0;
    }

    void menu()
    {
    int choice;

    cout << "1. Input Student Data
    ";
    cout << "2. Display Student Data
    ";
    cin >> choice;

    while (choice !=1 && choice !=2)
    {
    cout << "That is not a valid choice. Please re-enter 1 or 2:
    ";
    cin >> choice;
    }

    switch (choice)
    {
    case 1:
    create();
    clrscr();
    break;
    case 2:
    display();
    clrscr();
    break;
    }
    }



    void create(void)
    {
    stud info;
    int numstud, i, tcount=0, acount=0; //tcount and acount tally test/assn grades

    cout << "How many students do you want to enter into the database? ";
    cin >> numstud;

    for (i=0; i> info.id;


    cout << "Course Number - 7 characters:
    ";
    cin >> info.cnum;
    cout << "Section Number - 4 digits:
    ";
    cin >> info.sect;
    for (int t=0; t<=2; t++)
    {
    cout << "Enter test grade " << t+1 << ":"; //Enter 3 test grades
    cin >> info.test[t];
    tcount+=info.test[t];
    }
    for (int a=0; a<=5; a++)
    {
    cout << "Enter assignment grade " << a+1 << ":"; //Enter 6 assgn grades
    cin >> info.assn[a];
    acount+=info.assn[a];
    }
    cout << "Enter final exam grade: ";
    cin >>info.final;

    info.asavg=acount/3;
    info.tstavg=tcount/6;
    info.avg=(info.asavg+info.tstavg+info.final)/3;

    clrscr();
    insertnode(info);
    }

    }




    void insertnode(stud data)
    {
    stud *nodePtr, *newnode, *root; //newnode - newnode; nodeptr traverses database
    root=NULL; //root of tree


    newnode = new stud;

    [green]/************************************ *******************************************
    Here, I get this message:
    The left side of an assignment operator must be an addressable expression. Addressable expressions include the following:
    numeric or pointer variables
    structure field references or indirection through a pointer
    a subscripted array element

    I am not sure what is meant by this. newnode->id IS a structure field reference through a pointer. I don't get the message with any of the other places that I've made this very similar assignment. Am I referencing the pointer wrong here?

    ************************************************************************************/ [/green]
    newnode->id=data.id;
    newnode->left=newnode->right=NULL;

    if (!root)
    root=newnode;
    else
    {
    nodePtr=root;
    while (nodePtr!=NULL)
    {
    if (data.id < nodePtr->id)
    {
    if (nodePtr->left)
    nodePtr=nodePtr->left;
    else
    {
    nodePtr->left=newnode;
    break;
    }
    }
    else if (data.id > nodePtr->id)
    {
    if (nodePtr->right)
    nodePtr = nodePtr->right;
    else
    {
    nodePtr->right=newnode;
    break;
    }
    }
    else
    {
    cout << "This student is already listed in the database.
    ";
    break;
    }
    }
    }
    }





    void display()
    {
    int num;

    cout << " Display Menu

    ";
    cout << "To access student data, please enter the Student ID: ";
    cin >> num;

    clrscr();
    searchtree(num);
    }




    void searchtree(int val)
    {
    stud *root;
    stud *nodePtr=root;

    while (nodePtr)
    {

    [green]/************************************ *******************************************
    Here I get the message that it cannot convert int to int - but both val and nodePtr->id are ints. Is it because nodePtr->id is a pointer? How do I fix this?
    ************************************************************************************/ [/green]
    if (nodePtr->id==val)
    {
    cout << "ID: " << nodePtr->id << endl;
    cout << "Course Number: " << nodePtr->cnum << endl;
    cout << "Section Number: " << nodePtr->sect << endl;
    cout << "Assignment Grades:
    ";
    cout << " Assgn 1: " << nodePtr->assn[0] << endl;
    cout << " Assgn 2: " << nodePtr->assn[1] << endl;
    cout << " Assgn 3: " << nodePtr->assn[2] << endl;
    cout << " Assgn 4: " << nodePtr->assn[3] << endl;
    cout << " Assgn 5: " << nodePtr->assn[4] << endl;
    cout << " Assgn 6: " << nodePtr->assn[5] << endl;
    cout << "Test Grades:
    ";
    cout << " Test 1: " << nodePtr->test[0] << endl;
    cout << " Test 2: " << nodePtr->test[1] << endl;
    cout << " Test 3: " << nodePtr->test[2] << endl;
    }
    }
    }

    [/code]
  • don't do [code]int *id[4];[/code]
    Just do [code]int id;[/code]
    I haven't checked but it should fix your problems.
    [hr]Ethereal software and Mag monitors, doesn't get much better now does it?

  • : : This is a code for a class assignment that I wrote. I am continually getting error messages. The messages are in comment sections. Can someone tell me please what I am doing wrong? It seems the more I fix, the more errors I get??? I hope I don't sound like too much of an idiot. I am trying my best with this.
    : :
    :
    : [blue]I formatted the code to see what was going on. I made changes in red. So far (not done yet) main should return an int. Also "int *id[4];" looks wrong. More later.[/blue]
    : [code]
    : #include
    : #include
    : #include
    [red] #include // I'm sure some will not like this [/red]

    [red] #define LENID 4[/red]
    :
    : struct stud
    : {
    : [red]char[/red] id[LENID];
    : char cnum[8];
    : [red]char[/red] sect[LENID];
    : int test[3];
    : int assn[6];
    : int asavg, tstavg, final, avg;
    :
    : stud *left;
    : stud *right;
    : };
    :
    : // function prototypes
    :
    : void menu();
    : void create();
    : void insertnode(stud);
    : void searchtree (int);
    : void display();
    : void search(); // to find data
    :
    :
    : [red]int [/red]main([red]void[/red])
    : {
    : menu();
    : [red]return 0; [/red]
    : }
    :
    : void menu()
    : {
    : int choice;
    :
    : cout << "1. Input Student Data
    ";
    : cout << "2. Display Student Data
    ";
    : cin >> choice;
    :
    : while (choice !=1 && choice !=2)
    : {
    : cout << "That is not a valid choice. Please re-enter 1 or 2:
    ";
    : cin >> choice;
    : }
    :
    : switch (choice)
    : {
    : case 1:
    : create();
    : clrscr();
    : break;
    : case 2:
    : display();
    : clrscr();
    : break;
    : }
    : }
    :
    :
    :
    : void create(void)
    : {
    : stud info;
    : int numstud, i, tcount=0, acount=0; //tcount and acount tally test/assn grades
    :
    : cout << "How many students do you want to enter into the database? ";
    : cin >> numstud;
    :
    : for (i=0; i> info.id; [red] // info.id is now a char string[/red]
    :
    :
    : cout << "Course Number - 7 characters:
    ";
    : cin >> info.cnum;
    : cout << "Section Number - 4 digits:
    ";
    : cin >> info.sect;
    : for (int t=0; t<=2; t++)
    : {
    : cout << "Enter test grade " << t+1 << ":"; //Enter 3 test grades
    : cin >> info.test[t];
    : tcount+=info.test[t];
    : }
    : for (int a=0; a<=5; a++)
    : {
    : cout << "Enter assignment grade " << a+1 << ":"; //Enter 6 assgn grades
    : cin >> info.assn[a];
    : acount+=info.assn[a];
    : }
    : cout << "Enter final exam grade: ";
    : cin >>info.final;
    :
    : info.asavg=acount/3;
    : info.tstavg=tcount/6;
    : info.avg=(info.asavg+info.tstavg+info.final)/3;
    :
    : clrscr();
    : insertnode(info);
    : }
    :
    : }
    :
    :
    :
    :
    : void insertnode(stud data)
    : {
    : stud *nodePtr, *newnode, *root; //newnode - newnode; nodeptr traverses database
    : root=NULL; //root of tree
    :
    :
    : newnode = new stud;
    :
    : [green]/************************************ *******************************************
    : Here, I get this message:
    : The left side of an assignment operator must be an addressable expression. Addressable expressions include the following:
    : numeric or pointer variables
    : structure field references or indirection through a pointer
    : a subscripted array element
    :
    : I am not sure what is meant by this. newnode->id IS a structure field reference through a pointer. I don't get the message with any of the other places that I've made this very similar assignment. Am I referencing the pointer wrong here?
    :
    : ************************************************************************************/ [/green]
    [red] // since .id is now a char string [/red]

    [red] for (int x = 0; x < LENID; x++)
    newnode->id[x]=data->id[x]; [/red]
    : newnode->left=newnode->right=NULL;
    :
    : if (!root)
    : root=newnode;
    : else
    : {
    : nodePtr=root;
    : while (nodePtr!=NULL)
    : {
    : if (data[red->[/red]id < nodePtr->id)
    : {
    : if (nodePtr->left)
    : nodePtr=nodePtr->left;
    : else
    : {
    : nodePtr->left=newnode;
    : break;
    : }
    : }
    : else if (data.id > nodePtr->id)
    : {
    : if (nodePtr->right)
    : nodePtr = nodePtr->right;
    : else
    : {
    : nodePtr->right=newnode;
    : break;
    : }
    : }
    : else
    : {
    : cout << "This student is already listed in the database.
    ";
    : break;
    : }
    : }
    : }
    : }
    :
    :
    :
    :
    :
    : void display()
    : {
    : int num;
    :
    : cout << " Display Menu

    ";
    : cout << "To access student data, please enter the Student ID: ";
    : cin >> num;
    :
    : clrscr();
    : searchtree(num);
    : }
    :
    :
    :
    :
    : void searchtree(int val)
    : {
    : stud *root;
    : stud *nodePtr=root;
    [red] char buf[LENID};[/red]
    :
    : while (nodePtr)
    : {
    :
    : [green]/************************************ *******************************************
    : Here I get the message that it cannot convert int to int - but both val and nodePtr->id are ints. Is it because nodePtr->id is a pointer? How do I fix this?
    : ************************************************************************************/ [/green]
    [red] // now we put the char representation of the value in the char array
    sprintf(buf, "%4", val);[/red]
    : if (nodePtr->id==val)
    : {
    : cout << "ID: " << nodePtr->id << endl;
    : cout << "Course Number: " << nodePtr->cnum << endl;
    : cout << "Section Number: " << nodePtr->sect << endl;
    : cout << "Assignment Grades:
    ";
    : cout << " Assgn 1: " << nodePtr->assn[0] << endl;
    : cout << " Assgn 2: " << nodePtr->assn[1] << endl;
    : cout << " Assgn 3: " << nodePtr->assn[2] << endl;
    : cout << " Assgn 4: " << nodePtr->assn[3] << endl;
    : cout << " Assgn 5: " << nodePtr->assn[4] << endl;
    : cout << " Assgn 6: " << nodePtr->assn[5] << endl;
    : cout << "Test Grades:
    ";
    : cout << " Test 1: " << nodePtr->test[0] << endl;
    : cout << " Test 2: " << nodePtr->test[1] << endl;
    : cout << " Test 3: " << nodePtr->test[2] << endl;
    : }
    : }
    : }
    :
    : [/code]
    :
    [blue] I don't know if this works but it compiles fine. Some C++ purists will not like <stdio.h>. It would probably work fine using ints and converting the other direction. Check for typos.[/blue]

  • That did, at least make it executable (I also had to take the array off of sect variable.

    However, now, when it gets to the code below, it never accesses the while loop and I am positive that I am entering valid student ID's:

    void searchtree(int val)
    {
    stud *root;
    stud *nodePtr=root;
    char choice;


    while (nodePtr)
    {
    if (nodePtr->id==val)
    {
    cout << "ID: " << nodePtr->id << endl;
    cout << "Course Number: " << nodePtr->cnum << endl;
    cout << "Section Number: " << nodePtr->sect << endl;
    cout << "Assignment Grades:
    ";
    cout << " Assgn 1: " << nodePtr->assn[0] << endl;
    cout << " Assgn 2: " << nodePtr->assn[1] << endl;
    cout << " Assgn 3: " << nodePtr->assn[2] << endl;
    cout << " Assgn 4: " << nodePtr->assn[3] << endl;
    cout << " Assgn 5: " << nodePtr->assn[4] << endl;
    cout << " Assgn 6: " << nodePtr->assn[5] << endl;
    cout << "Test Grades:
    ";
    cout << " Test 1: " << nodePtr->test[0] << endl;
    cout << " Test 2: " << nodePtr->test[1] << endl;
    cout << " Test 3: " << nodePtr->test[2] << endl;
    getch();
    }
    else
    {
    cout << "frog";
    }

    }

    cout << "Would you like to search for a different student?";
    cin >> choice;


    : don't do [code]int *id[4];[/code]
    : Just do [code]int id;[/code]
    : I haven't checked but it should fix your problems.
    : [hr]Ethereal software and Mag monitors, doesn't get much better now does it?
    :
    :

  • Thanks :) I actually just got rid of two of the arrays in the struct. That seems to be what was causing the problems. For some reason, it will not access the while loop in the searchtree function even though I am passing it a valid student ID from the previous function. Have I got that coded wrong?


    : : : This is a code for a class assignment that I wrote. I am continually getting error messages. The messages are in comment sections. Can someone tell me please what I am doing wrong? It seems the more I fix, the more errors I get??? I hope I don't sound like too much of an idiot. I am trying my best with this.
    : : :
    : :
    : : [blue]I formatted the code to see what was going on. I made changes in red. So far (not done yet) main should return an int. Also "int *id[4];" looks wrong. More later.[/blue]
    : : [code]
    : : #include
    : : #include
    : : #include
    : [red] #include // I'm sure some will not like this [/red]
    :
    : [red] #define LENID 4[/red]
    : :
    : : struct stud
    : : {
    : : [red]char[/red] id[LENID];
    : : char cnum[8];
    : : [red]char[/red] sect[LENID];
    : : int test[3];
    : : int assn[6];
    : : int asavg, tstavg, final, avg;
    : :
    : : stud *left;
    : : stud *right;
    : : };
    : :
    : : // function prototypes
    : :
    : : void menu();
    : : void create();
    : : void insertnode(stud);
    : : void searchtree (int);
    : : void display();
    : : void search(); // to find data
    : :
    : :
    : : [red]int [/red]main([red]void[/red])
    : : {
    : : menu();
    : : [red]return 0; [/red]
    : : }
    : :
    : : void menu()
    : : {
    : : int choice;
    : :
    : : cout << "1. Input Student Data
    ";
    : : cout << "2. Display Student Data
    ";
    : : cin >> choice;
    : :
    : : while (choice !=1 && choice !=2)
    : : {
    : : cout << "That is not a valid choice. Please re-enter 1 or 2:
    ";
    : : cin >> choice;
    : : }
    : :
    : : switch (choice)
    : : {
    : : case 1:
    : : create();
    : : clrscr();
    : : break;
    : : case 2:
    : : display();
    : : clrscr();
    : : break;
    : : }
    : : }
    : :
    : :
    : :
    : : void create(void)
    : : {
    : : stud info;
    : : int numstud, i, tcount=0, acount=0; //tcount and acount tally test/assn grades
    : :
    : : cout << "How many students do you want to enter into the database? ";
    : : cin >> numstud;
    : :
    : : for (i=0; i> info.id; [red] // info.id is now a char string[/red]
    : :
    : :
    : : cout << "Course Number - 7 characters:
    ";
    : : cin >> info.cnum;
    : : cout << "Section Number - 4 digits:
    ";
    : : cin >> info.sect;
    : : for (int t=0; t<=2; t++)
    : : {
    : : cout << "Enter test grade " << t+1 << ":"; //Enter 3 test grades
    : : cin >> info.test[t];
    : : tcount+=info.test[t];
    : : }
    : : for (int a=0; a<=5; a++)
    : : {
    : : cout << "Enter assignment grade " << a+1 << ":"; //Enter 6 assgn grades
    : : cin >> info.assn[a];
    : : acount+=info.assn[a];
    : : }
    : : cout << "Enter final exam grade: ";
    : : cin >>info.final;
    : :
    : : info.asavg=acount/3;
    : : info.tstavg=tcount/6;
    : : info.avg=(info.asavg+info.tstavg+info.final)/3;
    : :
    : : clrscr();
    : : insertnode(info);
    : : }
    : :
    : : }
    : :
    : :
    : :
    : :
    : : void insertnode(stud data)
    : : {
    : : stud *nodePtr, *newnode, *root; //newnode - newnode; nodeptr traverses database
    : : root=NULL; //root of tree
    : :
    : :
    : : newnode = new stud;
    : :
    : : [green]/************************************ *******************************************
    : : Here, I get this message:
    : : The left side of an assignment operator must be an addressable expression. Addressable expressions include the following:
    : : numeric or pointer variables
    : : structure field references or indirection through a pointer
    : : a subscripted array element
    : :
    : : I am not sure what is meant by this. newnode->id IS a structure field reference through a pointer. I don't get the message with any of the other places that I've made this very similar assignment. Am I referencing the pointer wrong here?
    : :
    : : ************************************************************************************/ [/green]
    : [red] // since .id is now a char string [/red]
    :
    : [red] for (int x = 0; x < LENID; x++)
    : newnode->id[x]=data->id[x]; [/red]
    : : newnode->left=newnode->right=NULL;
    : :
    : : if (!root)
    : : root=newnode;
    : : else
    : : {
    : : nodePtr=root;
    : : while (nodePtr!=NULL)
    : : {
    : : if (data[red->[/red]id < nodePtr->id)
    : : {
    : : if (nodePtr->left)
    : : nodePtr=nodePtr->left;
    : : else
    : : {
    : : nodePtr->left=newnode;
    : : break;
    : : }
    : : }
    : : else if (data.id > nodePtr->id)
    : : {
    : : if (nodePtr->right)
    : : nodePtr = nodePtr->right;
    : : else
    : : {
    : : nodePtr->right=newnode;
    : : break;
    : : }
    : : }
    : : else
    : : {
    : : cout << "This student is already listed in the database.
    ";
    : : break;
    : : }
    : : }
    : : }
    : : }
    : :
    : :
    : :
    : :
    : :
    : : void display()
    : : {
    : : int num;
    : :
    : : cout << " Display Menu

    ";
    : : cout << "To access student data, please enter the Student ID: ";
    : : cin >> num;
    : :
    : : clrscr();
    : : searchtree(num);
    : : }
    : :
    : :
    : :
    : :
    : : void searchtree(int val)
    : : {
    : : stud *root;
    : : stud *nodePtr=root;
    : [red] char buf[LENID};[/red]
    : :
    : : while (nodePtr)
    : : {
    : :
    : : [green]/************************************ *******************************************
    : : Here I get the message that it cannot convert int to int - but both val and nodePtr->id are ints. Is it because nodePtr->id is a pointer? How do I fix this?
    : : ************************************************************************************/ [/green]
    : [red] // now we put the char representation of the value in the char array
    : sprintf(buf, "%4", val);[/red]
    : : if (nodePtr->id==val)
    : : {
    : : cout << "ID: " << nodePtr->id << endl;
    : : cout << "Course Number: " << nodePtr->cnum << endl;
    : : cout << "Section Number: " << nodePtr->sect << endl;
    : : cout << "Assignment Grades:
    ";
    : : cout << " Assgn 1: " << nodePtr->assn[0] << endl;
    : : cout << " Assgn 2: " << nodePtr->assn[1] << endl;
    : : cout << " Assgn 3: " << nodePtr->assn[2] << endl;
    : : cout << " Assgn 4: " << nodePtr->assn[3] << endl;
    : : cout << " Assgn 5: " << nodePtr->assn[4] << endl;
    : : cout << " Assgn 6: " << nodePtr->assn[5] << endl;
    : : cout << "Test Grades:
    ";
    : : cout << " Test 1: " << nodePtr->test[0] << endl;
    : : cout << " Test 2: " << nodePtr->test[1] << endl;
    : : cout << " Test 3: " << nodePtr->test[2] << endl;
    : : }
    : : }
    : : }
    : :
    : : [/code]
    : :
    : [blue] I don't know if this works but it compiles fine. Some C++ purists will not like <stdio.h>. It would probably work fine using ints and converting the other direction. Check for typos.[/blue]
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories