473,480 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I need help!

8 New Member
I am writing a program that is calculating windchill but I have two errors that I need help with because I am a just learning how to program.

Program1.cpp:22: error: no match for ‘operator<<’ in ‘ (&std: :cin) ->std: :basic_istream<_CharT, _Traits>: :operator>> [with _CharT = char, _Traits = std: :char _traits<char>](((double&)(&dTemperature))) <<std: :endl’

Program1.cpp:24: error: no match for ‘operator<<’ in ‘ (&std: :cin) ->std: :basic_istream<_CharT, _Traits>: :operator>> [with _CharT = char, _Traits = std: :char _traits<char>](((double&)(&dwindspeed))) <<std: :endl’

So if anyone could tell me what these mean.
Feb 18 '07 #1
3 1424
Ganon11
3,652 Recognized Expert Specialist
Could you post the code you are trying to compile? I expect you have made a typing error in your output statements.
Feb 18 '07 #2
DaRok28
8 New Member
Could you post the code you are trying to compile? I expect you have made a typing error in your output statements.
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. (
  7.    char cAgain;
  8.    double fWindchill, fTemperature, fWindspeed;
  9.  
  10.    do     
  11.    (
  12.        cout.setf(ios: :fixed);
  13.        cout.setf(ios: :showpoint);   
  14.        cout.precision(4);
  15.        cout << endl << “Please enter temperature, in degrees Celcius”;
  16.        cin >> fTemperature << endl;
  17.        cout << endl << “Please enter windspeed, in meters/second” << endl;
  18.        cin >> fWindspeed << endl;
  19.        fwindchill = 13.12 + (o.6251 * fTemperature) – 11.37 * pow(fWindspeed, 0.16) + (0.3956 * pow(fWindspeed, 0.16));
  20.        cout << “Temperature is ” << fTemperature << “ degrees Celcius.”;
  21.        cout << “Windspeed is “ << fWindspeed << “ meters/second.”;
  22.        cout << “Windchill index is “ << fWindchill << “ degrees Celcius.”;
  23.        cout << endl << “Run this calculation again? Y/y/N/n” << endl;
  24.        cin >> cAgain;
  25.    )while (cAgain == ‘Y’ || cAgain == ‘y’);
  26.  
  27.    cout << endl << “Thankyou for using this program!” << endl;
  28.  
  29.    return 0;
  30.  
  31. )
I am not even sure if this is the correct way to calulate windchill, but if it can help me fix those errors i might be able to proceed with fixing it, thanks.
Feb 18 '07 #3
Ganon11
3,652 Recognized Expert Specialist
The first two cin statements in your loop are what's giving you errors. In both cases, you use cin >> to input to a variable, but then you use << to try and output an endl. << can only be used with cout, the output device - cin is only used for input.
Feb 18 '07 #4

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

Similar topics

6
6302
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
5
2165
by: John Flynn | last post by:
hi all i'm going to be quick i have an assignment due which i have no idea how to do. i work full time so i dont have the time to learn it and its due date has crept up on me .. As follows:...
0
1822
by: xunling | last post by:
i have a question about answering ..... this topic is "need help" what do i have to write at te topic line, !after i have klicked the "answer message" button ive tried many possibilities,...
9
2907
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
7
3282
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
15
4560
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
16
2500
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
8
2709
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
0
3916
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
20
4217
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
0
7033
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
6903
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
7027
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
7071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6861
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
5318
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,...
0
2987
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...
1
557
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
170
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.