Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to trigger an event at a specified time Pin
calhuskerfan3-Feb-04 6:10
calhuskerfan3-Feb-04 6:10 
GeneralRe: How to trigger an event at a specified time Pin
Salvador Dali4-Feb-04 0:33
Salvador Dali4-Feb-04 0:33 
GeneralRe: How to trigger an event at a specified time Pin
calhuskerfan4-Feb-04 9:46
calhuskerfan4-Feb-04 9:46 
GeneralSerialize C++ class Pin
Anonymous3-Feb-04 4:50
Anonymous3-Feb-04 4:50 
GeneralRe: Serialize C++ class Pin
Selvam R3-Feb-04 6:59
professionalSelvam R3-Feb-04 6:59 
GeneralRe: Serialize C++ class Pin
John M. Drescher3-Feb-04 7:58
John M. Drescher3-Feb-04 7:58 
GeneralExporting diagrams to DXF Pin
Anonymous3-Feb-04 4:12
Anonymous3-Feb-04 4:12 
GeneralISDIGIT Function Pin
seth.jackson3-Feb-04 3:38
seth.jackson3-Feb-04 3:38 
How do I use the isdigit function my program won't compile. It says
invalid operands of types `long double' and `<unknown type>' to binary `operator=='

Here is my program

//Calculator program

#include <iostream>
#include <cctype>

using namespace std;

int main ()
{
long double var1;
long double var2;
char sign;

//Begin calculator loop. Will loop continuously until first
//number entered is a 0.

do {
cout << "Enter a number ";
cin >> var1;
cout << "Enter a sign ";
cin >> sign;
cout << "Enter a number ";
cin >> var2;

if(var1 == isdigit) continue;

//Begin calculator functions. +, -, /, *.

switch (sign){
case ('+'):
cout << var1 + var2 << '\n' << '\n';
break;
case ('-'):
cout << var1 - var2 << '\n' << '\n';
break;
case ('*'):
cout << var1 * var2 << '\n' << '\n';
break;
case ('/'):
cout << var1 / var2 << '\n' << '\n';
break;
default:
cout << "You didn't enter a correct sign";
cout << '\n' << '\n';
break;
//If the user enters an unrecognized sign they will get a
//message that says: You ddn't enter a correct sign.

}

} while (var1 != 0); //If first number entered is a 0
//the program will terminate at the end
//of the loop. (The Do While loop)
}

Confused | :confused:
GeneralRe: ISDIGIT Function Pin
SJolly3-Feb-04 4:19
SJolly3-Feb-04 4:19 
GeneralTooltips on CObject Pin
Kyudos3-Feb-04 3:27
Kyudos3-Feb-04 3:27 
QuestionHow to show icon of CDialog on task bar ? Pin
vgrigor3-Feb-04 3:02
vgrigor3-Feb-04 3:02 
AnswerRe: How to show icon of CDialog on task bar ? Pin
Diddy4-Feb-04 5:01
Diddy4-Feb-04 5:01 
GeneralRe: How to show icon of CDialog on task bar ? Pin
vgrigor4-Feb-04 22:19
vgrigor4-Feb-04 22:19 
GeneralLineStyle and Penwidth on Polyline Implementation Pin
Chinnaa Ganesh Kumar3-Feb-04 1:27
Chinnaa Ganesh Kumar3-Feb-04 1:27 
GeneralOn Draw() in a View Pin
cberam3-Feb-04 1:09
cberam3-Feb-04 1:09 
Generalbuilding a lib file with visual studio 6.0 Pin
pankajdaga3-Feb-04 0:22
pankajdaga3-Feb-04 0:22 
GeneralRe: building a lib file with visual studio 6.0 Pin
Michael P Butler3-Feb-04 0:41
Michael P Butler3-Feb-04 0:41 
GeneralRe: building a lib file with visual studio 6.0 Pin
pankajdaga4-Feb-04 10:14
pankajdaga4-Feb-04 10:14 
QuestionHow to chanhe background at button ? Pin
vgrigor3-Feb-04 0:22
vgrigor3-Feb-04 0:22 
AnswerRe: How to chanhe background at button ? Pin
BaldwinMartin3-Feb-04 0:31
BaldwinMartin3-Feb-04 0:31 
GeneralRe: How to chanhe background at button ? Pin
vgrigor3-Feb-04 0:34
vgrigor3-Feb-04 0:34 
AnswerRe: How to chanhe background at button ? Pin
Michael P Butler3-Feb-04 0:47
Michael P Butler3-Feb-04 0:47 
GeneralRe: How to chanhe background at button ? Pin
vgrigor3-Feb-04 1:11
vgrigor3-Feb-04 1:11 
GeneralRe: How to chanhe background at button ? Pin
Michael P Butler3-Feb-04 1:14
Michael P Butler3-Feb-04 1:14 
GeneralRe: How to chanhe background at button ? Pin
vgrigor3-Feb-04 1:26
vgrigor3-Feb-04 1:26 

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.