Hi, I'm using Microsoft Visual C++ and I keep getting this error referring to this one line in my main file . can someone HELP ME ?

#include <iostream>

using namespace std;
int main()
{
	float tempFahrenheit;
	float tempCelsius;
	float Omrekenen;

	cout << "Geef de temperatuur in Fahrenheit: ";
	cin >> tempFahrenheit;
	tempCelsius =Omrekenen(tempFahrenheit);
	cout << "\n Dit is de temperatuur in Celsius: ";
	cout << tempCelsius << endl;
	return 0;
}
float Omrekenen(float tempFahrenheit)
{
	float tempCelsius;
	tempCelsius = (tempFahrenheit - 32)*5/9;
	return tempCelsius;
}

Just like variables, functions have to be declared before you use them:

#include <iostream>

using namespace std;

float Omrekenen(float tempFahrenheit);

int main()
{
	float tempFahrenheit;
	float tempCelsius;
	float Omrekenen;

	cout << "Geef de temperatuur in Fahrenheit: ";
	cin >> tempFahrenheit;
	tempCelsius =Omrekenen(tempFahrenheit);
	cout << "\n Dit is de temperatuur in Celsius: ";
	cout << tempCelsius << endl;
	return 0;
}
float Omrekenen(float tempFahrenheit)
{
	float tempCelsius;
	tempCelsius = (tempFahrenheit - 32)*5/9;
	return tempCelsius;
}

im still having problems, with the code after declaring the function, same error massege

im still having problems, with the code after declaring the function, same error massege

I don't know in what language you are writing, but the reason the compiler complained is that you used the word Omrekenen{what does it mean by the way?} as a function name and as a float...

i changed your code to::

#include <iostream>

using namespace std;

float Omrekenen_func(float tempFahrenheit);

int main()
{
	float tempFahrenheit;
	float tempCelsius;
	float Omrekenen;

	cout << "Geef de temperatuur in Fahrenheit: ";
	cin >> tempFahrenheit;
	tempCelsius =Omrekenen_func(tempFahrenheit);
	cout << "\n Dit is de temperatuur in Celsius: ";
	cout << tempCelsius << endl;
	return 0;
}

float Omrekenen_func(float tempFahrenheit)
{
	float tempCelsius;
	tempCelsius = (tempFahrenheit - 32)*5/9;
	return tempCelsius;
}

and everything compiled fine!

omreken means to convert, im writing in dutch language .
and de code is working now thank you .

This question has already been answered. Start a new discussion instead.