need helpw/a error message
I don't understand why i keep getting this error message, hich is at the bottom of the page.
Script started on Thu Nov 29 21:35:58 2001
strauss.udel.edu% cat card.h
// header file for card class
#ifndef CARD_H
#define CARD_H
#include <iostream>
using std :: istream;
class Card {
friend istream &operator>>(istream &, Card &);
private:
char *name;
int size3;
int *phone;
int CardID;
int BookID;
public:
Card(char *, int *, int, int);
void print();
~Card();
Card(const Card&);
Card& operator=(const Card&);
int getCardID() {return CardID;}
int getBookID() {return BookID;}
void setBookID(int);
};
#endif
strauss.udel.edu% cat card.cc
//member definitions for card class
#include "card.h"
#include <iostream>
using std :: cout;
using std :: endl;
#include <cassert>
Card :: Card (char *n, int *p, int c, int b)
{
strcpy(n, name);
phone = p;
CardID = c;
BookID = b;
}
istream &operator>>(istream &input, Card &c) {
input >> c.name >> c.phone >> c.CardID
>> c.BookID;
return input;
}
void Card :: print() {
cout << name << endl;
cout << phone << endl;
cout << CardID << endl;
cout << BookID << endl;
}
Card :: ~Card() {
delete [] name;
delete [] phone;
}
Card :: Card(const Card &c) {
name = new char[strlen(c.name) + 1];
assert(name != 0);
size3 = (strlen(name) + 1);
for(int i = 0; i < size3; i++)
name[i] = c.name[i];
phone = new int[13];
assert(phone != 0);
for(int j = 0; j < 13; j++)
phone[j] = c.phone[j];
CardID = c.CardID;
BookID = c.BookID;
}
void Card :: setBookID(int b) {
BookID = (b >= 0) ? b : 0;
}
//Card &Card :: operator=(const Card &c) {
//}
strauss.udel.edu% make
CC -c card.cc
"card.cc", line 18: Error: The operation "std::basic_istream<char, std::char_traits<char>> >> int*" is illegal.
1 Error detected.
*** Error code 2
make: Fatal error: Command failed for target `card.o'
strauss.udel.edu% exit
strauss.udel.edu%
script done on Thu Nov 29 21:36:18 2001