error c2679, error c3847, error c2601, error c1075

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • liyanaddsce
    New Member
    • Apr 2015
    • 1

    error c2679, error c3847, error c2601, error c1075

    Error in function overloading. Cin dont print out anything
    Last edited by liyanaddsce; Apr 9 '15, 06:16 PM. Reason: No reason
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Code:
    cin >> microcar[count].vehicleName;
    First, vehicleName is a member function of typeOfVehicle. But the () are missing.

    Second, you would need an operator>>(type OfVechicle&, typeOfVehicle:: vehicleName*), which doesn't exist. Hence the error.

    The whole thing looks fishy. I suspect you want to enter the name of the vehicle using a typeOfVehicle object:

    Code:
    microcar[count].SetvehicleName();
    where typeOfVehicle:: SetVehicleName( ) does the cin.

    BTW: I notice the vehicleName is a char. Mighty short name. Maybe use a C++ string object.

    Comment

    Working...