| | |
Function and variable next
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 101
Reputation:
Solved Threads: 0
C++ Syntax (Toggle Plain Text)
// file celsius to F // calculate from c to f in the depth st #include <iostream> using namespace std; float celsiusAtDepth (float); float CtoF (float); int main () { float depth; float tempF, tempC; // get depth cout<< " Enter depth in Km " ; cin>> depth; //calculate temp tempC = celsiusAtDepth(depth); tempF = CtoF (tempC); //display result cout << " At a depth of " << depth << " km inside the earth , " ; cout<< "\n the temperature would be : " << tempC << "degrees C , \n the temperature would be " << cout << tempF<< "degree F " << endl; system ( "pause " ) ; } float celsiusAtdepth ( float depth) { return ( (10 * depth) +20); } float CtoF (float cel) { return (cel *1.8 +32 ); }
I dont know what the error with this program ,please help me
Last edited by cscgal; Oct 12th, 2008 at 5:27 am. Reason: Added code tags
the function name is different... the prototype has celsiusAtDepth and the definition has celsiusAtdepth...
c Syntax (Toggle Plain Text)
float celsiusAtDepth (float); float celsiusAtdepth ( float depth)
regards,
Ahamed.
Ahamed.
Read the error message - what does it say?
Also, please use code tags.
(Hing - check your spelling, capitalization counts.)
Also, please use code tags.
(Hing - check your spelling, capitalization counts.)
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
![]() |
Similar Threads
- def function(): help (Python)
- arguments in function (C)
- intercepting functions with a variable argument list (C)
- Moving to Python From PHP: Using a variable in a function (Python)
- Using a variable as an array's index? (C)
- static function? help (C++)
- Accessing a variable of another class (Java)
- A puzzl about function (C)
- variable function parameters functionname(int a, ...) (C)
Other Threads in the C++ Forum
- Previous Thread: Matrix Inversion help :'(
- Next Thread: Student Needing Help! C++
Views: 415 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project proxy python random read recursion recursive reference return sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






