Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Hide Caption Bar using SetWindowLong() Pin
Paresh Chitte10-Dec-07 0:39
Paresh Chitte10-Dec-07 0:39 
QuestionHow to enable Drag and Drop for tree view Pin
Javed Akhtar Ansari9-Dec-07 19:51
Javed Akhtar Ansari9-Dec-07 19:51 
GeneralC coding - structure Pin
chanduabcchandu9-Dec-07 18:35
chanduabcchandu9-Dec-07 18:35 
Answer[Message Deleted] Pin
Vince Rojas9-Dec-07 20:13
Vince Rojas9-Dec-07 20:13 
GeneralRe: C coding - structure Pin
toxcct9-Dec-07 21:01
toxcct9-Dec-07 21:01 
AnswerRe: C coding - structure [modified] Pin
Vince Rojas9-Dec-07 21:29
Vince Rojas9-Dec-07 21:29 
QuestionIs there an equivalent to CString Format in std::string ? Pin
uusheikh9-Dec-07 18:31
uusheikh9-Dec-07 18:31 
AnswerRe: Is there an equivalent to CString Format in std::string ? Pin
Stephen Hewitt9-Dec-07 19:37
Stephen Hewitt9-Dec-07 19:37 
You have a number of choices. Two spring immediately to mind:
1. Use ostringstream.
2. Use Boost's[^] Format[^] library.

Example using the first:
#include <string>
#include <sstream>
#include <iostream>
 
int main(int argc, char* argv[])
{
	using namespace std;
 
	ostringstream oss;
	const int one = 1;
	const int two = 2;
	oss << one << " + " << two << " is " << one+two;
 
	cout << oss.str() << endl;
 
	return 0;
}


Examples of the second can be found at the link provided. I'd go for the second approach.

Steve

GeneralRe: Is there an equivalent to CString Format in std::string ? Pin
uusheikh9-Dec-07 20:38
uusheikh9-Dec-07 20:38 
AnswerRe: Is there an equivalent to CString Format in std::string ? Pin
Javed Akhtar Ansari9-Dec-07 19:50
Javed Akhtar Ansari9-Dec-07 19:50 
GeneralRe: Is there an equivalent to CString Format in std::string ? Pin
toxcct9-Dec-07 20:58
toxcct9-Dec-07 20:58 
GeneralWant some information about Class Size Pin
ashishbhatt9-Dec-07 16:33
ashishbhatt9-Dec-07 16:33 
GeneralRe: Want some information about Class Size Pin
Rajasekharan Vengalil9-Dec-07 18:56
Rajasekharan Vengalil9-Dec-07 18:56 
GeneralRe: Want some information about Class Size Pin
Mark Salsbery10-Dec-07 7:48
Mark Salsbery10-Dec-07 7:48 
Questionabout multi monitor-how to displays same part of the virtual screen in two monitors [modified] Pin
firepotato9-Dec-07 13:19
firepotato9-Dec-07 13:19 
GeneralSetup.exe creating Pin
ddspliting9-Dec-07 7:02
ddspliting9-Dec-07 7:02 
GeneralRe: Setup.exe creating Pin
MarkB7779-Dec-07 13:54
MarkB7779-Dec-07 13:54 
GeneralRe: Setup.exe creating Pin
Nelek9-Dec-07 20:56
protectorNelek9-Dec-07 20:56 
GeneralPrining letters made of letters [modified] Pin
tashe9-Dec-07 6:19
tashe9-Dec-07 6:19 
GeneralRe: Prining letters made of letters Pin
Nelek9-Dec-07 20:55
protectorNelek9-Dec-07 20:55 
GeneralStack overflow Pin
RomTibi9-Dec-07 4:34
RomTibi9-Dec-07 4:34 
GeneralRe: Stack overflow Pin
Cedric Moonen9-Dec-07 4:41
Cedric Moonen9-Dec-07 4:41 
GeneralRe: Stack overflow Pin
RomTibi9-Dec-07 6:17
RomTibi9-Dec-07 6:17 
GeneralRe: Stack overflow Pin
Cyrilix9-Dec-07 22:30
Cyrilix9-Dec-07 22:30 
GeneralRe: Stack overflow Pin
Mark Salsbery9-Dec-07 7:20
Mark Salsbery9-Dec-07 7:20 

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.