GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Aug-2003, 19:29
monkster87 monkster87 is offline
New Member
 
Join Date: Aug 2003
Location: BC, Canada
Posts: 4
monkster87 is an unknown quantity at this point
Question

Code problem (a newbie question)


hi, i have a problem with this code and i can't figues it out!

Please be patient with me cuz i am learning C++ and i am trying to figure out functions! Heres the code:
CPP / C++ / C Code:
#incude <iostream.h>

float Convert(float);
int main()
{
    float tempfer;
    float tempcel;
    
    cout << "Please enter the temperature in Fahrenheit: ";
    cin >> tempfer;
    tempcel = Convert(tempfer);
    cout << "\nHere is the temperature in Celsius: ";
    cout << tempcel << endl;
        return 0;
}

float Convert(float tempfer)
{
    float tempcel;
    tempcel = ((tempfer - 32) * 5) / 9;
    return tempcel;
}

Any help would be appreciated! Thanx!
  #2  
Old 10-Aug-2003, 13:31
monkster87 monkster87 is offline
New Member
 
Join Date: Aug 2003
Location: BC, Canada
Posts: 4
monkster87 is an unknown quantity at this point
Exclamation

Plz Help!!!


Everytime i try to compile it, i get like 5 errors! I need to know how to fix the code, Plz help! Thanx!
  #3  
Old 11-Aug-2003, 10:16
Garth Farley Garth Farley is offline
Awaiting Email Confirmation
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
You're going to kick yourself

CPP / C++ / C Code:
#incude <iostream>

Shouldn't that be #include???

GF
  #4  
Old 11-Aug-2003, 12:46
monkster87 monkster87 is offline
New Member
 
Join Date: Aug 2003
Location: BC, Canada
Posts: 4
monkster87 is an unknown quantity at this point
Thumbs down

aHHHH


 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with C code belludandy C Programming Language 1 26-Jan-2004 21:28
folder problem in trees zuzupus MySQL / PHP Forum 23 26-Sep-2003 07:32
a C input question.. tmike C Programming Language 2 19-Sep-2003 02:39
a C input question tmike C Programming Language 1 16-Sep-2003 02:31
join problem zuzupus MySQL / PHP Forum 0 14-Aug-2003 05:11

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:56.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.