kha@idt.unit.no (06/20/89)
I tried to use genclass on classes generated by genclass, with litle sucess. I did put #include<String.h> into Stringdef.h but I still got problems. I am using g++-1.35.1- from g++.xtar.Z on yahi.stanford.edu. What I did is listed here. ( only the first part of the error messages) Knut-Haavard Aksnes. ------------------------------------------------------------------------ genclass String val def genclass String val Set genclass String val AVLSet genclass -2 String val StringAVLSet val Map genclass -2 String val StringAVLSet val AVLMap make g++ -g -c StringStringAVLSetAVLMap.cc StringStringAVLSetMap.h:35: parse error before `def' StringStringAVLSetMap.h:38: parse error before `dflt' StringStringAVLSetMap.h:47: virtual non function declaration for field `StringAVLSet' StringStringAVLSetMap.h:47: parse error before `&' StringStringAVLSetMap.h:54: virtual non function declaration for field `StringAVLSet' StringStringAVLSetMap.h:54: parse error before `&' StringStringAVLSetMap.h:59: parse error before `&' StringStringAVLSetMap.h:76: parse error before `&' StringStringAVLSetMap.h:81: `StringAVLSet' undeclared, outside of functions StringStringAVLSetMap.h:81: parse error before `dflt' StringStringAVLSetMap.h:81: warning: inline declaration ignored for function with `...' StringStringAVLSetMap.h:81: no `StringStringAVLSetMap' member function declared in class In method struct StringStringAVLSetMap *StringStringAVLSetMap::StringStringAVLSetMap (...): StringStringAVLSetMap.h:84: warning: assignment of integer from pointer lacks a cast At top level: StringStringAVLSetAVLMap.h:35: parse error before `cont' At top level: StringStringAVLSetAVLMap.h:37: warning: type specifier omitted for parameter At top level: StringStringAVLSetAVLMap.h:37: parse error before `c' At top level: StringStringAVLSetAVLMap.h:38: field `StringStringAVLSetAVLNode' has incomplete type At top level: StringStringAVLSetAVLMap.h:38: parse error before `*' At top level: StringStringAVLSetAVLMap.h:43: warning: type specifier omitted for parameter At top level: StringStringAVLSetAVLMap.h:43: parse error before `c' At top level:
gordon%stats.ucl.ac.uk@NSFNET-RELAY.AC.UK (Gordon Joly) (06/20/89)
You need a class prototype. So "genclass String val Set" uses String.cc String.hP and Set.ccP Set.hP. If you read these you will see that <T> is replaced by "int" for example. Gordon.