Re: Not happy with templates


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on March 28, 2001 at 07:58:22:

In Reply to: Not happy with templates posted by Brent on March 28, 2001 at 04:25:24:

: Two things
: the first is
: that for no apparent reason im getting LNK20001 unresolved external symbol errors in linking .. im certian all #includes are using #ifndef statements so i dont get this.

: But the real problem:

: When i have a template [class item] class ArrayT
: and goto declare an instance of that using the Author for item,

: or ArrayT [Author] List1(); using the default constructor ..

That syntax is a prototype for a function named List1 which takes no parameters and returns an ArrayT[Author] object by copy...


: I did a execution trace on this. During execution, this line was totally skipped. it wasnt executed at all. Ive never seen such a thing. Tracing variables also confirmed that this instance definition was never executed. Do i need more MSVC libraries or something?

:
: had to use brackets because of this script language on this board





Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]