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

C / C++ / MFC

 
GeneralRe: How to get outlook attachment event? Pin
Stuart Dootson17-Apr-09 0:49
professionalStuart Dootson17-Apr-09 0:49 
GeneralRe: How to get outlook attachment event? Pin
Stuart Dootson17-Apr-09 1:06
professionalStuart Dootson17-Apr-09 1:06 
QuestionPuzzle about c++ inherent Pin
sharion15-Apr-09 19:08
sharion15-Apr-09 19:08 
AnswerRe: Puzzle about c++ inherent [modified] Pin
_AnsHUMAN_ 15-Apr-09 19:27
_AnsHUMAN_ 15-Apr-09 19:27 
AnswerRe: Puzzle about c++ inherent Pin
ParagPatel15-Apr-09 21:50
ParagPatel15-Apr-09 21:50 
AnswerRe: Puzzle about c++ inherent Pin
Stuart Dootson15-Apr-09 22:51
professionalStuart Dootson15-Apr-09 22:51 
QuestionHow do I remove thousand seperator. Pin
cozyu15-Apr-09 16:06
cozyu15-Apr-09 16:06 
AnswerRe: How do I remove thousand seperator. Pin
Stuart Dootson15-Apr-09 22:47
professionalStuart Dootson15-Apr-09 22: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 0:00
Cedric Moonen16-Apr-09 0:00 
GeneralRe: How do I remove thousand seperator. Pin
Stuart Dootson16-Apr-09 0:08
professionalStuart Dootson16-Apr-09 0:08 
Question[OT] Re: How do I remove thousand seperator. Pin
David Crow16-Apr-09 3:28
David Crow16-Apr-09 3:28 
AnswerRe: [OT] Re: How do I remove thousand seperator. Pin
Stuart Dootson16-Apr-09 3:32
professionalStuart Dootson16-Apr-09 3:32 
GeneralRe: How do I remove thousand seperator. Pin
cozyu16-Apr-09 16:03
cozyu16-Apr-09 16:03 
QuestionMeasure timing of functions Pin
dybs15-Apr-09 14:33
dybs15-Apr-09 14:33 
AnswerRe: Measure timing of functions Pin
Luc Pattyn15-Apr-09 14:52
sitebuilderLuc Pattyn15-Apr-09 14:52 
AnswerRe: Measure timing of functions Pin
Stuart Dootson15-Apr-09 15:33
professionalStuart Dootson15-Apr-09 15:33 
GeneralRe: Measure timing of functions Pin
dybs15-Apr-09 15:59
dybs15-Apr-09 15:59 
AnswerRe: Measure timing of functions Pin
Jijo.Raj15-Apr-09 22:37
Jijo.Raj15-Apr-09 22:37 
QuestionC++ function source code size Pin
Eureka_jim15-Apr-09 10:35
Eureka_jim15-Apr-09 10:35 
AnswerRe: C++ function source code size Pin
Stuart Dootson15-Apr-09 11:18
professionalStuart Dootson15-Apr-09 11:18 
GeneralRe: C++ function source code size Pin
Rolf Kristensen15-Apr-09 11:52
Rolf Kristensen15-Apr-09 11:52 
GeneralRe: C++ function source code size Pin
Stuart Dootson15-Apr-09 15:15
professionalStuart Dootson15-Apr-09 15:15 
GeneralRe: C++ function source code size Pin
Eureka_jim16-Apr-09 6:13
Eureka_jim16-Apr-09 6:13 
AnswerRe: C++ function source code size Pin
Rolf Kristensen15-Apr-09 11:50
Rolf Kristensen15-Apr-09 11:50 
QuestionActiveX Pin
siva45515-Apr-09 8:33
siva45515-Apr-09 8: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.