Template classes in VS
-
I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002All of the methods are public. The data members are protected but they show up in the class view correctly. I've done a complete rebuild and it has no errors or warnings. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.
Thanks for your reply. Maybe I'll just make all of hte functions inline so that I can see the auto-complete. I did have some limited success with two of my methods showing up. Neither of them were inline, but one of htem had default parameters and the other was an overload. As long as I left one of them with a default parameter both would show up in the auto-complete menu. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.
I added AFX_INLINE to all of the methods in the file and that fixed the problem. Is there any logic behind this, or is it just and oddity? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n