On Thu, Mar 6, 2008 at 3:52 PM, Robert Ryan <[EMAIL PROTECTED]> wrote:
> what does it mean: error undeclared
> thanks
>
> #include <iostream>
> using namespace std;
> int main()
> {
[...]
> while (cin>>ch && !isdigit(ch)) { // throw away non-digits
> // we didn.t find a digit: give up
> if (!cin) error("no input");
There is no function called error() in scope.
> // put the digit back, so that we can read the number
> cin.unget();
> }
> }
>
>
> .cpp: In function `int main()':
> .cpp:22: `error' undeclared (first use this function)
> .cpp:22: (Each undeclared identifier is reported only once for each
> function it appears in.)
--
PJH
A man walks into a bakery, points and the girl behind the counter
"Is that a macaroon or a meringue?"
"No, you're right, it's a macaroon."