fork download
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. //#define LEN 100
  6. ////////////////////////////////////////////////////////////////////////////////////////////////////
  7. class employee{
  8. private:
  9. char name[100];
  10. unsigned long number;
  11. public:
  12. friend istream& operator >> (istream& s, employee& e);
  13. friend ostream& operator << (ostream& s, employee& e);
  14. };
  15. //--------------------------------------------------------------------------------------------------
  16. istream& operator >> (istream& s, employee& e){
  17. cout << "Name: "; s.getline(e.name,100,'\n');
  18.  
  19. return s;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout

Standard output is empty