Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!rex!wuarchive!psuvax1!rutgers!elbereth.rutgers.edu!rgonzal From: rgonzal@elbereth.rutgers.edu (Ralph Gonzalez) Newsgroups: comp.lang.c++ Subject: Passing class name as argument? Keywords: persistency Message-ID: Date: 29 Aug 90 19:16:57 GMT Distribution: na Organization: Rutgers Univ., New Brunswick, N.J. Lines: 25 I'm trying to make my Think C 4.0 code fully upward compatible with C++ so I can run things on some of the minicomputers around here. I've got one problem which could mean some serious headaches. In my Think C version of persistency (remember that there are no automated constructor/destuctor functions available) I was making use of the fact that in Think C a class name is itself a void pointer. For example, if I create the class Persistent, then I can define a member function returning a void pointer like this: void *Persistent::get_class(void) { return Persistent; } Neat, eh? Now, in C++ this gives a syntax error. My question is: Is there any way of passing class names like this in C++??????????? Thanks in advance! -Ralph Please reply via email to: rgonzal@chowder.rutgers.edu