Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,230 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,090 people online right now. Registration is fast and FREE... Join Now!




Temperature Program

 
Reply to this topicStart new topic

Temperature Program, Errors when complied

roncdav
post 16 Feb, 2008 - 03:53 PM
Post #1


New D.I.C Head

*
Joined: 10 Feb, 2008
Posts: 3

[code]
// HeatSensor1.cpp

#include <stdafx.h>
#include <iostream>

using namespace std;

class HeatSensor
{
public:
static getTemp (double f);



};

class EuroTherm: public HeatSensor
{


public:
static getTemp (double c);


};

int main()


{

double f;

return f ;
}


{ double c= (((double f) - a) * b);

double f;
const a = 32
const b = 0.555555

return double c;

}
[code]


C:\Program Files\Microsoft Visual Studio\MyProjects\HeatSensor1\HeatSensor1.cpp(44) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.

HeatSensor1.exe - 1 error(s), 0 warning(s)



This post has been edited by roncdav: 17 Feb, 2008 - 01:16 PM
User is offlineProfile CardPM

Go to the top of the page

GWatt
post 16 Feb, 2008 - 04:16 PM
Post #2


human inside

Group Icon
Joined: 1 Dec, 2005
Posts: 2,150



Thanked 16 times

Dream Kudos: 450
My Contributions


getTemp is a function and you're accessing it like a normal variable. You also need to pass an argument according to your function definition.
User is online!Profile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/21/08 09:26PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month