I get the following error when trying to compile the following. (oops it didnt paste first try)
C:\Users\Owner\Desktop\Study\C++\Assignment 1\Codeblocks\Assignment2\travelLength.h|24|error: multiple types in one declaration|
In the past I've always thought this to be a missing ";", however there is nothing missing this time (is there?). I have removed the #include "travelZone.h" from the example pasted below but i still get the error...ive had it with c++
yes im a student...frustrated...student
#ifndef TRAVELLENGTH_H #define TRAVELLENGTH_H #include<string> #include<iostream> class TravelLength { protected: int itsLengthMinutes; string itsName; public: TravelLength(); virtual ~TravelLength(); virtual void print() = 0; //display output for a travelpass object virtual string getName() const = 0; //return string of its Name virtual float PriceAccept(TravelZone* theZone) =0; friend ostream& operator <<(std::ostream& outputStream, const TravelLength& thisTLength); }; #endif
#include).