Message-ID: <32FD9CA9.6A08@dmv.com> Date: Sun, 09 Feb 1997 01:45:13 -0800 From: Pyro Technic Reply-To: invid AT dmv DOT com Organization: Happy 'N Snappy PC Repair MIME-Version: 1.0 To: djgpp AT delorie DOT com, djgpp AT delorie DOT com Subject: strange errors References: <32FB12A2 DOT 187A AT Mathematik DOT tu-chemnitz DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit ok guys, i need some help really bad. i have a strange problem w/ my prog. //heres the warnings on compliing D:\PROGS\cppic>gxx -Wall -c ampm_air.cpp ampm_air.cpp: In method `void airtime::set()': ampm_air.cpp:20: warning: initializing non-const `int &' with `Day' will use a t emporary d:/djgpp/lang/cxx/iostream.h:196: warning: in passing argument 1 of `istream::op erator >>(int &)' ampm_air.cpp:20: warning: initializing non-const `int &' with `Day' will use a t emporary d:/djgpp/lang/cxx/iostream.h:196: warning: in passing argument 1 of `istream::op erator >>(int &)' ampm_air.cpp: At top level: ampm_air.cpp:32: warning: return type for `main' changed to integer type gcc.exe: -lgpp: linker input file unused since linking not done gcc.exe: -lstdcx: linker input file unused since linking not done gcc.exe: -lm: linker input file unused since linking not done //end warnings //no linking errors or warnings R issued //here's the prog // arrayair.cpp // create an array of airtime objects #include #include enum Day { am, pm }; class airtime { private: int minutes, hours; Day half; public: void set() { char dummy; cout << "Enter time (ie. 4:45am): "; cin >> hours >> dummy >> minutes >> half; // i think the previous line is the trouble maker hours += minutes / 60; minutes %= 60; hours %= 12; } void display() { cout << hours << ':' << setfill('O') << setw(2) << minutes << half; } }; void main() { airtime at[20]; int n=0; char choice; do { cout << "Airtime " << n << ". "; at[n++].set(); cout << "Do another(Y/N) "; cin >> choice; } while(choice != 'n'); for(int j=0; j