5 Replies - 875 Views - Last Post: 03 April 2006 - 12:52 PM

#1 TerryWatts  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-March 06

Hi this is Terry

Post icon  Posted 29 March 2006 - 01:08 AM

Hi folks my name is Terry, I have just joined. I still use good Visual studio 6.0 ... hate change me.

Looking for some hep with a compiler error (STL)!
Is This A Good Question/Topic? 0
  • +

Replies To: Hi this is Terry

#2 Xenon  Icon User is offline

  • Connection failed
  • member icon

Reputation: 8
  • View blog
  • Posts: 1,595
  • Joined: 12-September 05

Re: Hi this is Terry

Posted 29 March 2006 - 01:11 AM

Welcome to DIC Terry ! :)

You'd better check out the VB Tutorials
and post your queries in the VB Forum

i still use VB6 but i like VB.net better ;) im switching over
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Hi this is Terry

Posted 29 March 2006 - 05:00 AM

Welcome to dream in code! Glad to have you.
Was This Post Helpful? 0
  • +
  • -

#4 TerryWatts  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-March 06

Re: Hi this is Terry

Post icon  Posted 29 March 2006 - 05:18 AM

Thanks folks!

I think I have solved my issue, it seems that the compiler gets in a twist with function name overloading in templates and appears confuse things like:

template < class V >
class OEL_EXPORT COELCombo : public COELComboBase
{
public:
COELCombo( );
virtual ~COELCombo();
....
bool Populate ( std::map < CString,V>* pMap);
bool Populate ( ADODB::_RecordsetPtr &rs, long ID=NULL); //************
bool Populate ( std::set < V>* pSet, long ID=NULL); //************
bool Populate( std::set < V*>* pSet, long ID=NULL);
bool Populate ( std::map < long,V>* pMap, long ID=NULL);
bool Populate ( std::map < long,V*>* pMap, long ID=NULL);
bool Populate ( std::vector< long, V*>* pV, long ID=NULL);

.....
};

The ones marked ******* seem to confuse the compiler in the vector STL header. I have got around it by renaming these two so that function overloading does not occur. But this seems a bit weird to me .. any ideas?

This is the compiler output if I name all the populate functions with the same name:
--------------------Configuration: CMS - Win32 Debug--------------------
Compiling...
System.cpp
d:\program files\microsoft visual studio\vc98\include\vector(23) : error C2039: 'size_type' : is not a member of '`global namespace''
D:\Data\Dev\CMS\2.0\2.0.0\2.0.0.3\Code\CMS\Src\System.cpp(456) : see reference to class template instantiation 'std::vector<long,class CSystem *>' being compiled
d:\program files\microsoft visual studio\vc98\include\vector(23) : error C2146: syntax error : missing ';' before identifier 'size_type'
D:\Data\Dev\CMS\2.0\2.0.0\2.0.0.3\Code\CMS\Src\System.cpp(456) : see reference to class template instantiation 'std::vector<long,class CSystem *>' being compiled
d:\program files\microsoft visual studio\vc98\include\vector(23) : error C2868: 'size_type' : illegal syntax for using-declaration; expected qualified-name
D:\Data\Dev\CMS\2.0\2.0.0\2.0.0.3\Code\CMS\Src\System.cpp(456) : see reference to class template instantiation 'std::vector<long,class CSystem *>' being compiled
d:\program files\microsoft visual studio\vc98\include\vector(24) : error C2039: 'difference_type' : is not a member of '`global namespace''
D:\Data\Dev\CMS\2.0\2.0.0\2.0.0.3\Code\CMS\Src\System.cpp(456) : see reference to class template instantiation 'std::vector<long,class CSystem *>' being compiled

etc
etc
etc
Was This Post Helpful? 0
  • +
  • -

#5 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1865
  • View blog
  • Posts: 20,278
  • Joined: 17-March 01

Re: Hi this is Terry

Posted 29 March 2006 - 08:58 AM

Hi Terry! If you're still having problems, post that in the VB forum so one of our folks can take a look for you, not many people look in the introduce yourself forum.

Welcome to dream.in.code! Hope we can help get everything working for you.
Was This Post Helpful? 0
  • +
  • -

#6 MarkoDaGeek  Icon User is offline

  • Dirty Technophile
  • member icon

Reputation: 11
  • View blog
  • Posts: 11,158
  • Joined: 13-October 01

Re: Hi this is Terry

Posted 03 April 2006 - 12:52 PM

Welcome to Dream.In.Code Terry!! My name is Mark and I’m one of the resident Team Members here on DIC. If you have any community related questions feel free to ask any of us. DIC is the perfect place for new comers to expand their knowledge about Programming and Web Development. I know I’ve learned a lot from this place and I’m sure you will too!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1