[prog] C++ class counstruct problem
E!
evolution_9112003 at yahoo.com.au
Thu May 1 21:36:49 EST 2003
Hi I been trying to run this following program. But it gives me a weird
error: "asemetric.cpp:16: type specifier omitted for parameter `
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions."
Can anyone please tell me where did I go wrong in this program? I am new
to C/ C++
#include<iostream>
using namespace std;
class vehicle
{
public:
vehicle (char name, char model);
void print();
private:
char car_name;
char car_model;
void testcar();
};
int main (int argc, char*, argv[])
{
vehicle a("Toyota", "Corolla", 1990);
vehicle b("Nissan", "Sunny", 1994);
vehicle c("Mercedes-Benz", "550", 1990);
cout << "Original Statistics: " << endl;
cout << "=====================" <<endl;
a.print();
b.print();
c.print();
return (0);
}
vehicle::vehicle(char name, char model)
:car_name(name), car_model(model)
{
testcar();
};
More information about the Programming
mailing list