STL string problem 
Author Message
 STL string problem

Hi,
I have a class with the following class defined : string GetName();
I get an exception when trying to do: cout << o->GetName() << endl;
I dont get an exception when doing : string tmp = o->GetName();  cout  <<
tmp << endl;

O is an object dynamically loaded from a DLL and im using VC7 beta 2.

Anyone knows what is the cause of this problem ?



Wed, 19 May 2004 21:18:31 GMT  
 STL string problem
Eran,

Try to include <string>. Indeed, some headers (e.g. <vector>) use <xstring>
(internal header) and therefore you get the std::string defined, but all
strigs's non-member operators are not there.

alex.

Quote:

> Hi,
> I have a class with the following class defined : string GetName();
> I get an exception when trying to do: cout << o->GetName() << endl;
> I dont get an exception when doing : string tmp = o->GetName();  cout  <<
> tmp << endl;

> O is an object dynamically loaded from a DLL and im using VC7 beta 2.

> Anyone knows what is the cause of this problem ?

--

MarketSwitch corp.    phone:  (571) 434 4355


Sun, 23 May 2004 07:14:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. STL String problem in VC7

2. problem with global operator new/delete and STL string

3. Linking Problem Using STL string

4. STL/MFC problem with set<string>

5. Problem with STL string class and MFC Serialize()

6. stl::string = (16 chars) problem

7. Problem with allocating stl::string object

8. Problems with MS implementation of STL::string!

9. Problems in using stl string

10. stl string returned from dll - problem

11. Warnings using STL Map<string,string>

12. VARIANT String assign to STL string

 

 
Powered by phpBB® Forum Software