Please excuse my confusion about this.
Where did the m come from that is in "MATRIX *m = new *MATRIX;"
That entire line makes no sense to me.
 
Here is some info that may help:
PASSING A STRUCTURE POINTER USING A FUNCTION:
 
struct x_type{
 int one;     // element
 int two;     // element
 char *pstr;  // element
} a; // variable list
 
void printStruct(x_type *px);
 
int maint(void)
{
 
 assign values to a;
 some code .....;
 
 printStruct(&a); // a is an x_type variable
 
 return 0;
}
 
// This uses C++ but there is little difference from C
void printStruct(x_type *px)
{
 cout << px->one << endl;
 cout << px->two << endl;
 cout << px->pstr << endl;
}
----- Original Message -----
Sent: Wednesday, October 27, 2004 5:46 PM
Subject: [c-prog] Struct Issues


Hello everyone,
I have 2 structs...

typedef struct node {
      int row;
      int col;
      int val;
      struct node *row_link;
      struct node *col_link;
} NODE;

typedef struct {
      NODE *head;
} MATRIX;

And in a function, I have...

MATRIX *m = new *MATRIX;

But this seems to crash my program.  Any ideas?

Shamoon






To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.




To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5529720.6602079.3001176/D=groups/S=:HM/A=2372354/rand=953544899


Yahoo! Groups Links

Reply via email to