delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/25/07:29:56

From: Andy Eskilsson <x-aes AT telelogic DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Rhide and templates
Date: 25 Apr 1997 10:22:58 +0200
Organization: Telelogic AB, Sweden
Lines: 22
Sender: x-aes AT vega
Message-ID: <ksrafzldel.fsf@telelogic.se>
References: <335FCC9F DOT 5852 AT ucsu DOT Colorado DOT edu>
Reply-To: x-aes AT telelogic DOT se
NNTP-Posting-Host: vega.telelogic.se
Mime-Version: 1.0 (generated by tm-edit 7.101)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

/ William Heymann <heymann AT ucsu DOT Colorado DOT edu> wrote:
| I am currently working on using a template in my program to make a
| dynamic 1 and 2 dimensional array of any type. Whenever I try to compile
| the program the program will compile but, when it tries to link the
| program into an executable I get unrecognized fuction errors for every
| single function that I have that is part of the template. 
| 	I tried originally having two files a cpp and an h file but, when I
| changed it to a template it didn't work. I looked at some examples in
| some C++ books that I have and they had everything in the header file so
| I put everything in my header file also. This still did not work. Even
| the books example did not work.
| 	Is there a specific way that I have to include files to make them
| templates or some syntax that I am missing. Included below is a small
| example that shows the code for the 1D dynamic array.

There are some trouble with gcc and templates.. (well to be honest,
not many compilers supports templates to 100% by the standard)

Check the info-docs for gcc, something like.. c++ extensions, template
instantiation.

	/Andy

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019