Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBITWISE opearation Pin
Shah Satish6-Jun-07 2:43
Shah Satish6-Jun-07 2:43 
AnswerRe: BITWISE opearation Pin
JudyL_MD6-Jun-07 2:52
JudyL_MD6-Jun-07 2:52 
AnswerRe: BITWISE opearation Pin
David Crow6-Jun-07 2:53
David Crow6-Jun-07 2:53 
AnswerRe: BITWISE opearation Pin
CPallini6-Jun-07 2:53
mveCPallini6-Jun-07 2:53 
AnswerRe: BITWISE opearation Pin
apoorva_raje6-Jun-07 2:54
apoorva_raje6-Jun-07 2:54 
AnswerRe: BITWISE opearation Pin
Cedric Moonen6-Jun-07 2:54
Cedric Moonen6-Jun-07 2:54 
AnswerRe: BITWISE opearation Pin
Rajkumar R6-Jun-07 2:57
Rajkumar R6-Jun-07 2:57 
QuestionHow to check that is number or not Pin
KARFER6-Jun-07 2:15
KARFER6-Jun-07 2:15 
Hello all

i have problem that when i'm input a character in emp_no field the program end or exit

i want that when i input number the program accept it and when i input character display me message that is wrong input and return to input number again

i used isdigit function but i want to return input again if the input not number

and Thank's For All

<br />
<br />
class EMPLOYEE         				<br />
{<br />
	private:<br />
		int emp_no;<br />
		char emp_name[30];<br />
		int age;<br />
		int selary;<br />
		int taxt;<br />
<br />
	public: 			   //EMPLOYEE(void);<br />
		       void set_emp_no(int no)<br />
		       {<br />
<br />
				emp_no=no;<br />
<br />
<br />
		       }<br />
<br />
		       int get_emp_no()<br />
		       {<br />
				return emp_no;<br />
		       }<br />
<br />
		       void set_emp_name()<br />
		       {<br />
				cin>>emp_name;<br />
		       }<br />
<br />
		       void get_emp_name()<br />
		       {<br />
				cout<<emp_name;<br />
		       }<br />
<br />
void Set_emp ();<br />
<br />
};<br />
<br />
void EMPLOYEE::set_e()<br />
{<br />
	int no,ag,sel;<br />
<br />
		Begin:<br />
		cout <<"\nEnter Employee No:";<br />
		cin>>no;<br />
		if (isdigit (no))<br />
		set_emp_no(no);<br />
		else<br />
		{<br />
			if (isalpha (no))<br />
			cout <<"error man";<br />
		}<br />
		goto Begin;<br />
<br />
<br />
		cout <<"\nEnter Employee Name:";<br />
		set_emp_name();<br />
}<br />


To Be Or Not To Be
(KARFER)

AnswerRe: How to check that is number or not Pin
jhwurmbach6-Jun-07 2:47
jhwurmbach6-Jun-07 2:47 
AnswerRe: How to check that is number or not Pin
David Crow6-Jun-07 2:55
David Crow6-Jun-07 2:55 
QuestionEasy One Pin
VonHagNDaz6-Jun-07 2:10
VonHagNDaz6-Jun-07 2:10 
AnswerRe: Easy One Pin
Rajkumar R6-Jun-07 2:26
Rajkumar R6-Jun-07 2:26 
GeneralRe: Easy One Pin
VonHagNDaz7-Jun-07 2:03
VonHagNDaz7-Jun-07 2:03 
QuestionIntellisense feature Pin
Demian Panello6-Jun-07 2:05
Demian Panello6-Jun-07 2:05 
AnswerRe: Intellisense feature Pin
bigphish6-Jun-07 18:12
bigphish6-Jun-07 18:12 
GeneralRe: Intellisense feature Pin
Demian Panello7-Jun-07 1:14
Demian Panello7-Jun-07 1:14 
QuestionRelease mode Crashes while Debug works fine! Pin
Immunity186-Jun-07 1:47
Immunity186-Jun-07 1:47 
AnswerRe: Release mode Crashes while Debug works fine! Pin
CPallini6-Jun-07 2:04
mveCPallini6-Jun-07 2:04 
GeneralRe: Release mode Crashes while Debug works fine! Pin
Immunity186-Jun-07 2:09
Immunity186-Jun-07 2:09 
GeneralRe: Release mode Crashes while Debug works fine! Pin
Immunity186-Jun-07 2:11
Immunity186-Jun-07 2:11 
Questionwhat DefWindowProc does to WM_PAINT message? Pin
LiYS6-Jun-07 0:12
LiYS6-Jun-07 0:12 
AnswerRe: what DefWindowProc does to WM_PAINT message? Pin
Mark Salsbery6-Jun-07 5:25
Mark Salsbery6-Jun-07 5:25 
QuestionNewbie: how to make PrintPreview the initial view Pin
redflyingpig6-Jun-07 0:11
redflyingpig6-Jun-07 0:11 
Questiondll [modified] Pin
jannathali6-Jun-07 0:01
jannathali6-Jun-07 0:01 
AnswerRe: dll Pin
Anurag Gandhi6-Jun-07 0:47
professionalAnurag Gandhi6-Jun-07 0:47 

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.