"no match for 'operator>>'" error

I am completely confused as to what could be causing this error? I feel like i've tried everything!
The error is occuring in my input module. I will post that first and comment out the line that has the error. Then I'll post my header file and my main module just in case the root of the problem is found in either of them.

Anyone familiar with this "no match for 'operator>>'" error???

INPUT MODULE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include "header.h"
using namespace std;

void input (int & accountNumber, char & accountType, float & minimumBalance, float & currentBalance)

{
   cout << "enter account number, account type, minimum balance, and current balance." << endl;

//ERROR ----->   cin >> accountNumber >> accountType >> minimumBalance >> currentBalance >> endl;
 
 do
    {
         if (!cin);
         cout << "Account must be a 5 digit integer (i.e. 10000 thru 99999)" << endl;
         cout << "Account type must be (c, C, s or S)"  << endl;
         cout << "Minimum balance must be greater than or equal to 1000" << endl;
         cout << "Ending balance must be non-negative" << endl;

    }
    while (cin == 1);
    
}


MAIN MODULE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "header.h"

int main ()
{
   
    float minimumBalance, currentBalance, endBalance; 

    char accountType, response; 
    
    int accountNumber;
          
     do
      { 
           input (accountNumber, accountType, minimumBalance, currentBalance);
           cout << "\nAny more accounts? (y,n) ";
           cin >> response;
      }          
    while (response == 'Y' || response == 'y');
    
    calculate (accountType, minimumBalance, currentBalance, endBalance);
    myLabel ("pretest 1", "11/9/2010");   
    output (accountType, minimumBalance, currentBalance, endBalance);
    system ("Pause");

    return 0;
    
}    


HEADER FILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef header_h
#define header_h

#include <iostream>
#include <iomanip>
#include <cstdlib>

using namespace std;

      //Named constants 
const float S_RATE = .04;
const float S_CHARGE = 10.00;
const float C_RATE1 = .05;
const float C_RATE2 = .03;
const float C_CHARGE = 25.00;


void extern input(int&, char&, float&, float&);
void extern calculate(char, float, float, float&);
void extern output (char, float, float, float);
void extern myLabel(const char *, const char *);

#endif 


If anyone could help it would be greatly appreciated! thanks!
Last edited on
Solution found! cant use endl; with cin!
Topic archived. No new replies allowed.