TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JOHNNY BRAZEAL
from: DARIN MCBRIDE
date: 1998-05-02 11:57:00
subject: g++ & templates

 JB> goal: use different files for template based classes, main, and headers. 
You really can't... not in general, anyway.  The compiler needs to know all 
of the template code to instantiate it.
However, gcc may allow you to do this - but it's not portable to other 
compilers.  Try:
 JB> *.h ========================= 
#pragma interface
[...]
 JB> *.cpp ======================= 
Change this to *.cc
I notice that the EMX port has in include/cpp/std a file bastring.h and a 
file bastring.cc that seem to work - I've used the template in there fairly 
often.
Good luck,
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.