Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionA joke on C Pin
Edward10261-Apr-10 7:57
Edward10261-Apr-10 7:57 
AnswerRe: A joke on C Pin
CPallini1-Apr-10 8:10
mveCPallini1-Apr-10 8:10 
QuestionHow to do function with timout & getting message properly ? Pin
oppstp1-Apr-10 7:42
oppstp1-Apr-10 7:42 
QuestionRe: How to do function with timout & getting message properly ? Pin
David Crow1-Apr-10 8:15
David Crow1-Apr-10 8:15 
AnswerRe: How to do function with timout & getting message properly ? Pin
oppstp1-Apr-10 15:06
oppstp1-Apr-10 15:06 
QuestionPicture Control with scroll bars. PinPopular
ashwath19791-Apr-10 5:02
ashwath19791-Apr-10 5:02 
QuestionC++ Thousand Separators Pin
awesometrickycool1-Apr-10 2:37
awesometrickycool1-Apr-10 2:37 
AnswerRe: C++ Thousand Separators Pin
Garth J Lancaster1-Apr-10 2:56
professionalGarth J Lancaster1-Apr-10 2:56 
why dont you look at regular expressions ? - they allow you to 'describe' what input should look like and then perform match tests for example

The other issue you might have, is, if you are writing for an international audience, the thousands separator is different depending on there you are :-

Aus : 1,234.00
France : 1.234,00

just two examples ...

ps .. as a start for your regular expression, consider

([0-9\-\+\.].)

the [] denote the start of a 'character 'set' - there some predefined ones like :digit:, :alpha: , in this case Im saying match any character from 0 to 9, ie 0 1 2 3 4 5 6 7 8 9 .. -, +, . usually have a meaning in a regular expression (regex) to that need to be 'escaped' to say treat them as is.. the last '.', ie right before the right bracket ')' , is not escaped, which means '1 or more repetitions (iirc) else what that would match would be a single digit number .. the () denote a 'match sub/group' - so if I had an array of matches returned by a regex, match[0] would be the entire matched expression, match[1] would be the first bracketed set etc

anyway, Im waffling - do a google on regular expressions, play with them in the language of your choice - they are well worthwhile spending time on

'g'
QuestionRe: C++ Thousand Separators Pin
David Crow1-Apr-10 3:03
David Crow1-Apr-10 3:03 
AnswerRe: C++ Thousand Separators Pin
Garth J Lancaster1-Apr-10 3:06
professionalGarth J Lancaster1-Apr-10 3:06 
AnswerRe: C++ Thousand Separators Pin
Joe Woodbury1-Apr-10 7:15
professionalJoe Woodbury1-Apr-10 7:15 
GeneralRe: C++ Thousand Separators Pin
awesometrickycool1-Apr-10 15:08
awesometrickycool1-Apr-10 15:08 
QuestionRe: C++ Thousand Separators Pin
David Crow1-Apr-10 15:33
David Crow1-Apr-10 15:33 
AnswerRe: C++ Thousand Separators Pin
awesometrickycool1-Apr-10 15:49
awesometrickycool1-Apr-10 15:49 
GeneralRe: C++ Thousand Separators Pin
David Crow1-Apr-10 16:26
David Crow1-Apr-10 16:26 
GeneralRe: C++ Thousand Separators Pin
Joe Woodbury1-Apr-10 16:02
professionalJoe Woodbury1-Apr-10 16:02 
GeneralRe: C++ Thousand Separators Pin
awesometrickycool1-Apr-10 16:17
awesometrickycool1-Apr-10 16:17 
GeneralRe: C++ Thousand Separators Pin
David Crow1-Apr-10 16:29
David Crow1-Apr-10 16:29 
GeneralRe: C++ Thousand Separators Pin
Joe Woodbury1-Apr-10 17:05
professionalJoe Woodbury1-Apr-10 17:05 
GeneralRe: C++ Thousand Separators Pin
awesometrickycool3-Apr-10 12:48
awesometrickycool3-Apr-10 12:48 
GeneralRe: C++ Thousand Separators Pin
awesometrickycool3-Apr-10 12:49
awesometrickycool3-Apr-10 12:49 
GeneralRe: C++ Thousand Separators Pin
Joe Woodbury3-Apr-10 13:04
professionalJoe Woodbury3-Apr-10 13:04 
GeneralRe: C++ Thousand Separators Pin
awesometrickycool3-Apr-10 13:30
awesometrickycool3-Apr-10 13:30 
GeneralRe: C++ Thousand Separators Pin
Joe Woodbury3-Apr-10 15:06
professionalJoe Woodbury3-Apr-10 15:06 
QuestionProblem with glut when linking statically Pin
jocasa1-Apr-10 2:25
jocasa1-Apr-10 2:25 

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.