templated class in microsoft visual c++ 7.0
From: John (selcon_at_yahoo.com)
Date: 10/30/03
- Next message: Derek Baker: "Re: basic_string::npos"
- Previous message: Gene Wirchenko: "basic_string::npos"
- Next in thread: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Reply: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Oct 2003 13:59:25 -0800
Hello,
I'm writing my first templated class in MS VC++, and I'm running into
some problems, hopefully someone could help.
I'm writing a templated class, with the class declarations in a .h
file, the class definitions (the methods) in a .cpp file, and the main
function (which uses the templated class) in another .cpp file.
I get a "Unresolved external symbol ......" error when I try to build
my project. However, if I shift the definitions from the .cpp file to
the header file, everything works.
Is there some VC++ issue where the definition codes must be in the
same file as the declaration?
Thanks!
John
- Next message: Derek Baker: "Re: basic_string::npos"
- Previous message: Gene Wirchenko: "basic_string::npos"
- Next in thread: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Reply: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|