473,503 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error c2679, error c3847, error c2601, error c1075

1 New Member
Error in function overloading. Cin dont print out anything
Apr 9 '15 #1
1 1390
weaknessforcats
9,208 Recognized Expert Moderator Expert
Expand|Select|Wrap|Line Numbers
  1. cin >> microcar[count].vehicleName;
First, vehicleName is a member function of typeOfVehicle. But the () are missing.

Second, you would need an operator>>(typeOfVechicle&, 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:

Expand|Select|Wrap|Line Numbers
  1. 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.
Apr 9 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
12510
by: c++newbie | last post by:
Hi all, I try to compile the following classes: main.cpp: #include <algorithm> #include <iostream> #include <fstream> #include <iterator>
3
1805
by: sachinv1821 | last post by:
hi , i am Getting this Error fatal error C1189: #error : "eh.h is only for C++!" my Problem is i am Having C++ librabry and Appropriate .h file i want to Access Them is .c File Files..... to Be...
3
2383
by: sclarkstone | last post by:
Im getting this error; Parse error: syntax error, unexpected T_STRING, expecting ':' or ';' with this line; header ('postcodesearch.php?e=nw&pcode=',); I cant find whats wrong, can anyone...
3
4245
by: Christina Brook | last post by:
I am fairly new at this and I am I am receiving this error code: Parse error: syntax error, unexpected T_STRING in /home/brooks/christinalbrooks-www/index.html on line 1 for this code: <?xml...
3
1938
by: ehpratah | last post by:
hi im having a problem in saving data in my database and i try everything i know but still im having this error message in my page..please help me thanks guys <?php /*$cs = mysql_connect...
1
1857
by: geobb08 | last post by:
</div> <div class="featured_tab"> <img src="http://bytes.com/images/demo/5.PNG" alt="" /> <p>Help</p> </div> </li> <?php }?> </ul> </div> </div> </div>
5
1497
by: kity | last post by:
<?php session_start(); include("includes/config_db.php"); // Define $myusername and $mypassword $myusername=$_POST; $mypassword=$_POST; // To protect MySQL injection (more detail about MySQL...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5592
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.