Click here to Skip to main content
15,790,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get outlook attachment event? Pin
Stuart Dootson17-Apr-09 1:49
professionalStuart Dootson17-Apr-09 1:49 
GeneralRe: How to get outlook attachment event? Pin
Stuart Dootson17-Apr-09 2:06
professionalStuart Dootson17-Apr-09 2:06 
QuestionPuzzle about c++ inherent Pin
sharion15-Apr-09 20:08
sharion15-Apr-09 20:08 
AnswerRe: Puzzle about c++ inherent [modified] Pin
_AnsHUMAN_ 15-Apr-09 20:27
_AnsHUMAN_ 15-Apr-09 20:27 
AnswerRe: Puzzle about c++ inherent Pin
ParagPatel15-Apr-09 22:50
ParagPatel15-Apr-09 22:50 
AnswerRe: Puzzle about c++ inherent Pin
Stuart Dootson15-Apr-09 23:51
professionalStuart Dootson15-Apr-09 23:51 
QuestionHow do I remove thousand seperator. Pin
cozyu15-Apr-09 17:06
cozyu15-Apr-09 17:06 
AnswerRe: How do I remove thousand seperator. Pin
Stuart Dootson15-Apr-09 23:47
professionalStuart Dootson15-Apr-09 23:47 
Your locale[^] is getting in the way.

You need to tell the stringstream to use a locale without number punctuation. The simplest way to do that is to just use the std::locale::classic() locale like this:

std::string strText;
std::stringstream ssBuf;
ssBuf.imbue(std::locale::classic()); // This line tells the stringstream to use the classic locale
ssBuf<<55555;
ssBuf>>strText;


However, this loses any other locale-specific properties, so you might just want to use the number punctuation bit of the classic locale, like this:

std::string strText;
std::stringstream ssBuf;
std::locale l;
l = l.combine<std::numpunct<char> >(std::locale::classic());
ssBuf.imbue(l);
ssBuf<<55555;
ssBuf>>strText;


The combine method call copies your global locale and replaces the copy's number punctuation facet with the classic locale's number punctuation facet.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: How do I remove thousand seperator. Pin
Cedric Moonen16-Apr-09 1:00
Cedric Moonen16-Apr-09 1:00 
GeneralRe: How do I remove thousand seperator. Pin
Stuart Dootson16-Apr-09 1:08
professionalStuart Dootson16-Apr-09 1:08 
Question[OT] Re: How do I remove thousand seperator. Pin
David Crow16-Apr-09 4:28
David Crow16-Apr-09 4:28 
AnswerRe: [OT] Re: How do I remove thousand seperator. Pin
Stuart Dootson16-Apr-09 4:32
professionalStuart Dootson16-Apr-09 4:32 
GeneralRe: How do I remove thousand seperator. Pin
cozyu16-Apr-09 17:03
cozyu16-Apr-09 17:03 
QuestionMeasure timing of functions Pin
dybs15-Apr-09 15:33
dybs15-Apr-09 15:33 
AnswerRe: Measure timing of functions Pin
Luc Pattyn15-Apr-09 15:52
sitebuilderLuc Pattyn15-Apr-09 15:52 
AnswerRe: Measure timing of functions Pin
Stuart Dootson15-Apr-09 16:33
professionalStuart Dootson15-Apr-09 16:33 
GeneralRe: Measure timing of functions Pin
dybs15-Apr-09 16:59
dybs15-Apr-09 16:59 
AnswerRe: Measure timing of functions Pin
Jijo.Raj15-Apr-09 23:37
Jijo.Raj15-Apr-09 23:37 
QuestionC++ function source code size Pin
Eureka_jim15-Apr-09 11:35
Eureka_jim15-Apr-09 11:35 
AnswerRe: C++ function source code size Pin
Stuart Dootson15-Apr-09 12:18
professionalStuart Dootson15-Apr-09 12:18 
GeneralRe: C++ function source code size Pin
Rolf Kristensen15-Apr-09 12:52
Rolf Kristensen15-Apr-09 12:52 
GeneralRe: C++ function source code size Pin
Stuart Dootson15-Apr-09 16:15
professionalStuart Dootson15-Apr-09 16:15 
GeneralRe: C++ function source code size Pin
Eureka_jim16-Apr-09 7:13
Eureka_jim16-Apr-09 7:13 
AnswerRe: C++ function source code size Pin
Rolf Kristensen15-Apr-09 12:50
Rolf Kristensen15-Apr-09 12:50 
QuestionActiveX Pin
siva45515-Apr-09 9:33
siva45515-Apr-09 9:33 

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.