Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!galaxy!andromeda!dave From: dave@andromeda.rutgers.edu (Dave Bloom) Newsgroups: comp.lang.c++ Subject: CFRONT braindamaged? (Or me?) Message-ID: <2205@galaxy> Date: 7 Feb 89 16:40:42 GMT Sender: news@galaxy Reply-To: dave@andromeda (Dave Bloom) Organization: Rutgers University, Newark, NJ Lines: 33 Hi there. We're running AT&T's C++ Ver 1.2.1, and as far as I'm concerned, the following should work hunky-dorey. Does anybody see anything wrong with my syntax? ---------------------------------------------------------------------- class zz { public: void (*xx)(char*); void a(char* s) { printf("function a: %s\n", s); } void b(char* s) { printf("function b: %s\n", s); } void c(char* s) { printf("function c: %s\n", s); } zz(int i) { if(i==0) xx= &(zz::a); else if(i==1) xx= &(zz::b); else xx= &(zz::c); } }; main() { zz dave(1); dave.xx("Yes!!!"); } ---------------------------------------------------------------------- Thanx. _______________________________________________________________________________ rutgers\ | Dave Bloom galaxy >!andromeda!dave -or- dave@andromeda.rutgers.edu | Work: (201)648-5085 pyramid/ |