Thread: What is the error here?

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    84

    What is the error here?

    #include<iostream>


    using namespace std;

    #include "Time.h"

    int main(void)
    {
    TimeOfDay time1, time2;
    int hours = 19, minutes = 15;
    time1.setTime(7, 35);
    time2.setTime(hours, minutes);
    cout<<"First time: ";
    time1.displayMilitaryTime();
    cout<<endl<<"First Time: ";

    time1.displayTime();
    cout<<endl<<"Second time: ";

    time2.displayMilitaryTime();
    cout<<endl<<"Second time: ";
    time2.displayTime();
    return 0;
    }

    C:\Documents and Settings\Administrator.COMPUTER-1ZZXR1\Desktop\Web Folders\C++\Time.cpp(29) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Display the code for time.h. BTW, your compiler might not like the title of your header because there already is a time.h.

Popular pages Recent additions subscribe to a feed