Click here to Skip to main content
15,907,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to associate an index value with the cstring objects in a CStringArray in MFC.? Pin
_AnsHUMAN_ 8-Oct-12 1:25
_AnsHUMAN_ 8-Oct-12 1:25 
AnswerRe: How to associate an index value with the cstring objects in a CStringArray in MFC.? Pin
Richard MacCutchan8-Oct-12 2:44
mveRichard MacCutchan8-Oct-12 2:44 
QuestionChild dialog shadow remains Pin
shivareaj7-Oct-12 23:04
shivareaj7-Oct-12 23:04 
AnswerRe: Child dialog shadow remains Pin
Sivaraman Dhamodharan7-Oct-12 23:11
Sivaraman Dhamodharan7-Oct-12 23:11 
GeneralRe: Child dialog shadow remains Pin
shivareaj7-Oct-12 23:21
shivareaj7-Oct-12 23:21 
GeneralRe: Child dialog shadow remains Pin
Sivaraman Dhamodharan8-Oct-12 0:30
Sivaraman Dhamodharan8-Oct-12 0:30 
AnswerRe: Child dialog shadow remains Pin
Richard MacCutchan8-Oct-12 2:41
mveRichard MacCutchan8-Oct-12 2:41 
GeneralRe: Child dialog shadow remains Pin
shivareaj8-Oct-12 4:21
shivareaj8-Oct-12 4:21 
GeneralRe: Child dialog shadow remains Pin
Richard MacCutchan8-Oct-12 4:46
mveRichard MacCutchan8-Oct-12 4:46 
QuestionC++ vs MFC Pin
Sivaraman Dhamodharan7-Oct-12 21:37
Sivaraman Dhamodharan7-Oct-12 21:37 
AnswerRe: C++ vs MFC Pin
Jochen Arndt7-Oct-12 21:47
professionalJochen Arndt7-Oct-12 21:47 
AnswerRe: C++ vs MFC Pin
CPallini8-Oct-12 0:08
mveCPallini8-Oct-12 0:08 
QuestionException in IAccessibleProxyImpl from CMFCPropertyGridCtrl Pin
Bob Pryor4-Oct-12 6:50
Bob Pryor4-Oct-12 6:50 
AnswerRe: Exception in IAccessibleProxyImpl from CMFCPropertyGridCtrl Pin
Stephen Hewitt7-Oct-12 4:59
Stephen Hewitt7-Oct-12 4:59 
AnswerRe: Exception in IAccessibleProxyImpl from CMFCPropertyGridCtrl Pin
Bob Pryor12-Oct-12 6:30
Bob Pryor12-Oct-12 6:30 
GeneralRe: Exception in IAccessibleProxyImpl from CMFCPropertyGridCtrl Pin
Stephen Hewitt12-Oct-12 17:17
Stephen Hewitt12-Oct-12 17:17 
AnswerCMFCPropertyGridCtrl in a CPropertyPage (or a CMFCPropertyPage) Pin
Ursus3108-Nov-15 22:32
Ursus3108-Nov-15 22:32 
Questionneed code to check if the value is numeric in C Pin
Mikerush74-Oct-12 6:49
Mikerush74-Oct-12 6:49 
I am student, taking C programming now.
I have assignment to write function to check if inputed data is numbers. if not - it should write that, and ask to enter number again.
I wrote code, to write error message, but dont know how to make program to work on next input.. should I call the Main function again ?

int main()
{

double hours; //hours worked in a week
double payrate; // hourly salary
double grosspay; //total weekly payment
int k; //number of values read

printf ("Enter number of hours, and hourly pay (or press 0 to exit) \n");

while ((k = scanf ("%lf%lf", &hours, &payrate))==2)
{

if (isdigit(hours) !=0)
return hours;
else
printf ("You entered invalid data, please enter number of hours \n");


if (isdigit(payrate) !=0)
return payrate;
else
printf ("You entered invalid data, please enter payrate \n");

if (hours==0 || payrate==0)
{
printf ("Good Bye. \n\n");
system("PAUSE");
return 0;
}

double grosspay;
grosspay = calculateGrossPay(hours, payrate);

printf ("Hours worked: %.2f\n", hours);
printf ("Hourly Rate: %.2f\n\n", payrate);
printf ("Your weekly payment is: $ %.2f \n\n\n", grosspay);
AnswerRe: need code to check if the value is numeric in C Pin
Richard MacCutchan4-Oct-12 7:22
mveRichard MacCutchan4-Oct-12 7:22 
GeneralRe: need code to check if the value is numeric in C Pin
Mikerush74-Oct-12 7:50
Mikerush74-Oct-12 7:50 
GeneralRe: need code to check if the value is numeric in C Pin
Richard MacCutchan4-Oct-12 7:53
mveRichard MacCutchan4-Oct-12 7:53 
AnswerRe: need code to check if the value is numeric in C Pin
CPallini4-Oct-12 9:48
mveCPallini4-Oct-12 9:48 
QuestionRe: need code to check if the value is numeric in C Pin
David Crow4-Oct-12 9:55
David Crow4-Oct-12 9:55 
AnswerRe: need code to check if the value is numeric in C Pin
Richard MacCutchan4-Oct-12 21:37
mveRichard MacCutchan4-Oct-12 21:37 
GeneralRe: need code to check if the value is numeric in C Pin
Mikerush75-Oct-12 8:30
Mikerush75-Oct-12 8:30 

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.