[Prev][Next][Index]
initializing class variables
- From: unicron@cs.utexas.edu (Lance Aiji Tokuda)
- Date: Wed, 30 Oct 1996 10:01:14 -0600
- To: sage-bugs@extreme.indiana.edu
- Subject: initializing class variables
- Sender: owner-sage-bugs@extreme.indiana.edu
Sage team,
pC++2dep produces an "error: member function not found3" when I try to
initialize class variables. Here is an example program:
______________________
#include <stdio.h>
struct X {
static int a;
};
int X::a = 1; // this line produces an error
main(){
printf("a has the value %d\n", X::a);
}
______________________
This is standard C++ from p.150 of Stroustrup (hardcover). Is this a
known bug? Please let me know.
Thanks,
Lance Tokuda
unicron@cs.utexas.edu