GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Mar-2005, 22:09
f15e f15e is offline
New Member
 
Join Date: Mar 2005
Posts: 2
f15e is on a distinguished road

bug w/ templated classes


I have been using MS Visual C++ 6.0 on and off for about 2 years. Anyway, I am writing a program using a templated class, but Visual 6.0 does not like this. I keep getting compiler errors. So I looked up the error message and found that there is a bug in the software when using templated classes.

I know my code works b/c I have compiled it using a different compiler at school.

Does anyone know of a fix for this or give me some advice on this issue?

Thanks!
  #2  
Old 06-Mar-2005, 16:31
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,218
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
Quote:
Originally Posted by f15e
I have been using MS Visual C++ 6.0 on and off for about 2 years. Anyway, I am writing a program using a templated class, but Visual 6.0 does not like this. I keep getting compiler errors. So I looked up the error message and found that there is a bug in the software when using templated classes.

I know my code works b/c I have compiled it using a different compiler at school.

Does anyone know of a fix for this or give me some advice on this issue?

Thanks!

Maybe if you post the code in question (and tell someone what compiler you used for which it worked and what the results are supposed to be, and ...) then someone could contribute some understanding.

VC++ 6 has lots of known bugs, and I would fell silly trying to list them all and maybe get lucky to the extent of hitting on your particular error, much less suggesting a workaround (if it exists).

Regards,

Dave
  #3  
Old 06-Mar-2005, 18:14
f15e f15e is offline
New Member
 
Join Date: Mar 2005
Posts: 2
f15e is on a distinguished road

MS Visual c++ 6.0 template errors


Ok, rather than posting my code, can you suggests a good compiler that can handle templates, etc....... for c++ code? I have MS Vis. C++ 6.0, but I don't necessarily have to use it. I would prefer a compiler that works instead of having to alter all of my code in order for it to work on that compiler.

Thanks!
  #4  
Old 06-Mar-2005, 18:36
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,218
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
Quote:
Originally Posted by f15e
Ok, rather than posting my code, can you suggests a good compiler that can handle templates, etc....... for c++ code? I have MS Vis. C++ 6.0, but I don't necessarily have to use it. I would prefer a compiler that works instead of having to alter all of my code in order for it to work on that compiler.

Thanks!

I'm sure others on this board do more MFC/VC++ programming than I do. My problem is that when saddled with other people's code with various Microsoft-specific "features", I don't usually know how to work around them with other, more robust, compilers (the GNU mingw g++ with dev-c++, for example). I usually just start over. Sometimes the code is actually non-standard, and by fixing the code, other the Microsoft-specific bugs move around to somewhere less malignant, and the others compilers can handle it also.

I wonder if newer Microsoft Visual C++ (.Net versions) have bug fixes that address the problems you have found? I'll bet someone here (not me) can answer specific questions that you have.

I'm sorry that I can't be more helpful.

Regards,

Dave
  #5  
Old 07-Mar-2005, 00:56
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 1,032
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough
Well, could you at list show us the errors you got? Maybe we'll be able to fix them without changing your compiler. Of course there are bugs , and indeed .NET solved some of them (but I don't have a list).

This might seem obvious to you, but just in case: don't try to put a template class' definition in the header and it's implementation in a separate .cpp. Just in case...

Kind regards,
Lucain
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fairly simple classes help please sammacs C++ Forum 0 30-Nov-2004 10:58
Using map<> with classes crystalattice C++ Forum 3 14-Nov-2004 17:23
First time using classes crystalattice C++ Forum 6 13-Oct-2004 09:21
ClassView not showing my classes (VC++, namespace, headers) ?!?!? djovanov C++ Forum 1 13-Jan-2004 05:54
using windows WMI and CMI classes in Dev-c++ Dawis C++ Forum 0 26-Oct-2003 05:18

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:27.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.