Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString Pin
_AnsHUMAN_ 19-Sep-06 2:43
_AnsHUMAN_ 19-Sep-06 2:43 
AnswerRe: CString Pin
Jörgen Sigvardsson19-Sep-06 2:03
Jörgen Sigvardsson19-Sep-06 2:03 
GeneralRe: CString Pin
SilentSilent19-Sep-06 2:38
SilentSilent19-Sep-06 2:38 
GeneralRe: CString Pin
Jörgen Sigvardsson19-Sep-06 2:42
Jörgen Sigvardsson19-Sep-06 2:42 
AnswerRe: CString Pin
_AnsHUMAN_ 19-Sep-06 2:07
_AnsHUMAN_ 19-Sep-06 2:07 
AnswerRe: CString Pin
KarstenK19-Sep-06 2:27
mveKarstenK19-Sep-06 2:27 
AnswerRe: CString Pin
David Crow19-Sep-06 2:59
David Crow19-Sep-06 2:59 
AnswerRe: CString Pin
Zac Howland19-Sep-06 3:14
Zac Howland19-Sep-06 3:14 
Here is a base-10 checker that allows for ,'s and -'s (but doesn't check for placement). You can easily extend it to check for proper placement of special characters (,'s, and -'s) as well as other base numbers and floating point numbers.

// function to check for base-10 digits only
bool is_digit_base10(const CString& str)
{
	static CString allowedChars = _T("0123456789,-");
	const unsigned int length = str.GetLength();
	for (unsigned int i = 0; i < length; ++i)
	{
		char buffer[2] = {0};
		buffer[0] = str[i];
		if (-1 == allowedChars.FindOneOf(buffer))
		{
			return false;
		}
	}
	return true;
}


If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

QuestionTHread TErmination PRoblem!! Pin
WIr3D 0x9019-Sep-06 1:08
WIr3D 0x9019-Sep-06 1:08 
AnswerRe: THread TErmination PRoblem!! Pin
Christopher Duncan19-Sep-06 1:14
Christopher Duncan19-Sep-06 1:14 
AnswerRe: THread TErmination PRoblem!! Pin
_AnsHUMAN_ 19-Sep-06 1:17
_AnsHUMAN_ 19-Sep-06 1:17 
AnswerRe: THread TErmination PRoblem!! Pin
Jörgen Sigvardsson19-Sep-06 5:17
Jörgen Sigvardsson19-Sep-06 5:17 
QuestionToolbar image list color depth Pin
Christopher Duncan19-Sep-06 0:56
Christopher Duncan19-Sep-06 0:56 
AnswerRe: Toolbar image list color depth Pin
pratapM19-Sep-06 1:31
pratapM19-Sep-06 1:31 
AnswerRe: Toolbar image list color depth Pin
tanvon malik19-Sep-06 1:32
tanvon malik19-Sep-06 1:32 
AnswerRe: Toolbar image list color depth Pin
pratapM19-Sep-06 1:33
pratapM19-Sep-06 1:33 
AnswerRe: Toolbar image list color depth Pin
tanvon malik19-Sep-06 2:01
tanvon malik19-Sep-06 2:01 
GeneralRe: Toolbar image list color depth Pin
Christopher Duncan19-Sep-06 4:26
Christopher Duncan19-Sep-06 4:26 
AnswerRe: Toolbar image list color depth Pin
Jörgen Sigvardsson19-Sep-06 2:07
Jörgen Sigvardsson19-Sep-06 2:07 
GeneralRe: Toolbar image list color depth Pin
Christopher Duncan19-Sep-06 4:29
Christopher Duncan19-Sep-06 4:29 
GeneralRe: Toolbar image list color depth Pin
Jörgen Sigvardsson19-Sep-06 5:11
Jörgen Sigvardsson19-Sep-06 5:11 
GeneralRe: Toolbar image list color depth Pin
Christopher Duncan19-Sep-06 11:24
Christopher Duncan19-Sep-06 11:24 
AnswerRe: Toolbar image list color depth Pin
KarstenK19-Sep-06 2:34
mveKarstenK19-Sep-06 2:34 
AnswerThanks, everyone! Pin
Christopher Duncan19-Sep-06 11:25
Christopher Duncan19-Sep-06 11:25 
QuestionHow to convert char* to char Pin
vc++_fragrance19-Sep-06 0:28
vc++_fragrance19-Sep-06 0:28 

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.