Click here to Skip to main content
15,890,973 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get rid of Visual Studio's automatic debugging? Pin
1-Dec-01 23:30
suss1-Dec-01 23:30 
AnswerRe: How to get rid of Visual Studio's automatic debugging? Pin
Michael P Butler2-Dec-01 1:32
Michael P Butler2-Dec-01 1:32 
GeneralError Starting Program Pin
SixString1-Dec-01 18:02
SixString1-Dec-01 18:02 
GeneralRe: Error Starting Program Pin
Michael P Butler2-Dec-01 1:39
Michael P Butler2-Dec-01 1:39 
GeneralDefine controller in VC 7 Pin
mazy1-Dec-01 17:52
mazy1-Dec-01 17:52 
GeneralSTL to: Cin, Cout, ifstream & ofstream Pin
valikac1-Dec-01 16:32
valikac1-Dec-01 16:32 
GeneralRe: STL to: Cin, Cout, ifstream & ofstream Pin
Michael P Butler2-Dec-01 1:42
Michael P Butler2-Dec-01 1:42 
GeneralRe: STL to: Cin, Cout, ifstream & ofstream Pin
Igor Sukhov2-Dec-01 6:05
Igor Sukhov2-Dec-01 6:05 
Just seen the solutuion proposed by Michael P Butler, yeah - it's should work - but
it needs additional call to c_str() member function (dont wanna say that this will cause the
perfomance problem, but it's not looks fine =)

The my STL's implementation (the one that comes with VC6++ ) and (most likely) yours have the << operator overloaded for a basic_string - so the code that you've shown

<br />
template<class _E, class _Tr, class _A> inline<br />
    basic_ostream<_E, _Tr>& __cdecl operator<<(<br />
        basic_ostream<_E, _Tr>& _O,<br />
        const basic_string<_E, _Tr, _A>& _X)<br />
    {<br />
    _O << _X.c_str();<br />
    return (_O); }<br />




in your post should compile flawlessly. The potentional problem that could cause the
compile errors is that you've included old include files...

so - try to compile this code:

<br />
#include <string><br />
using std::string;<br />
#include <iostream><br />
using std::cout;<br />
<br />
<br />
int main()<br />
{<br />
	string s = "Russian Software Developers Network - www.RSDN.ru";<br />
	cout << s;<br />
<br />
                return 0;<br />
}<br />


if the code above will fail to compile - use the Michael's approach to workaround the problem.

Best regards,

-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com


Russian Software Developer Network
GeneralRe: STL to: Cin, Cout, ifstream & ofstream Pin
Erik Funkenbusch3-Dec-01 9:28
Erik Funkenbusch3-Dec-01 9:28 
GeneralRe: STL to: Cin, Cout, ifstream & ofstream Pin
valikac3-Dec-01 12:45
valikac3-Dec-01 12:45 
QuestionMRU list, how do i use it ? Pin
robbied1-Dec-01 16:10
robbied1-Dec-01 16:10 
AnswerRe: MRU list, how do i use it ? Pin
Igor Sukhov2-Dec-01 6:17
Igor Sukhov2-Dec-01 6:17 
GeneralRe: MRU list, how do i use it ? Pin
robbied2-Dec-01 7:12
robbied2-Dec-01 7:12 
GeneralChecking a menu item Pin
IGx891-Dec-01 14:47
IGx891-Dec-01 14:47 
GeneralRe: Checking a menu item Pin
Tim Smith1-Dec-01 14:56
Tim Smith1-Dec-01 14:56 
GeneralRe: Checking a menu item Pin
IGx892-Dec-01 8:38
IGx892-Dec-01 8:38 
GeneralCView Pin
Pham Viet Tung1-Dec-01 13:48
Pham Viet Tung1-Dec-01 13:48 
GeneralRe: CView Pin
Nish Nishant1-Dec-01 15:30
sitebuilderNish Nishant1-Dec-01 15:30 
GeneralInsight on STL Containers & One Specific Question Pin
valikac1-Dec-01 12:53
valikac1-Dec-01 12:53 
GeneralRe: Insight on STL Containers & One Specific Question Pin
Chris Hafey1-Dec-01 17:08
Chris Hafey1-Dec-01 17:08 
GeneralRe: Insight on STL Containers & One Specific Question Pin
Todd Smith2-Dec-01 5:29
Todd Smith2-Dec-01 5:29 
GeneralRe: Insight on STL Containers & One Specific Question Pin
valikac3-Dec-01 12:48
valikac3-Dec-01 12:48 
GeneralFinding the keyboard and mouse Pin
Winstone1-Dec-01 11:10
Winstone1-Dec-01 11:10 
GeneralRe: Finding the keyboard and mouse Pin
Nish Nishant1-Dec-01 15:34
sitebuilderNish Nishant1-Dec-01 15:34 
GeneralRe: Finding the keyboard and mouse Pin
Hadi Rezaee1-Dec-01 19:06
Hadi Rezaee1-Dec-01 19:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.