User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,710 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 1744 | Replies: 5 | Solved
Reply
Join Date: Sep 2007
Posts: 6
Reputation: Beginner+597 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Beginner+597 Beginner+597 is offline Offline
Newbie Poster

Question HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #1  
Sep 21st, 2007
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;
} 
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,515
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 31
Solved Threads: 489
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #2  
Sep 21st, 2007
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;
} 
I'm here to prove you wrong.
Reply With Quote  
Join Date: Sep 2007
Posts: 6
Reputation: Beginner+597 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Beginner+597 Beginner+597 is offline Offline
Newbie Poster

Re: HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #3  
Sep 22nd, 2007
im still having problems, with the code after declaring the function, same error massege
Reply With Quote  
Join Date: Nov 2006
Location: Athens, Greece
Posts: 199
Reputation: n.aggel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 9
n.aggel's Avatar
n.aggel n.aggel is offline Offline
Junior Poster

Re: HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #4  
Sep 22nd, 2007
Originally Posted by Beginner+597 View Post
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::

  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. float Omrekenen_func(float tempFahrenheit);
  6.  
  7. int main()
  8. {
  9. float tempFahrenheit;
  10. float tempCelsius;
  11. float Omrekenen;
  12.  
  13. cout << "Geef de temperatuur in Fahrenheit: ";
  14. cin >> tempFahrenheit;
  15. tempCelsius =Omrekenen_func(tempFahrenheit);
  16. cout << "\n Dit is de temperatuur in Celsius: ";
  17. cout << tempCelsius << endl;
  18. return 0;
  19. }
  20.  
  21. float Omrekenen_func(float tempFahrenheit)
  22. {
  23. float tempCelsius;
  24. tempCelsius = (tempFahrenheit - 32)*5/9;
  25. return tempCelsius;
  26. }

and everything compiled fine!
Two roads diverged in a wood, and I— I took the one less traveled by, and that has made all the difference.

by Robert Frost the "The Road Not Taken"
Reply With Quote  
Join Date: Nov 2006
Location: Athens, Greece
Posts: 199
Reputation: n.aggel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 9
n.aggel's Avatar
n.aggel n.aggel is offline Offline
Junior Poster

Re: HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #5  
Sep 22nd, 2007
PS:: if this solves your problem, plz mark it the thread as solved!
Two roads diverged in a wood, and I— I took the one less traveled by, and that has made all the difference.

by Robert Frost the "The Road Not Taken"
Reply With Quote  
Join Date: Sep 2007
Posts: 6
Reputation: Beginner+597 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Beginner+597 Beginner+597 is offline Offline
Newbie Poster

Re: HELP (error C2064: term does not evaluate to a function taking 1 arguments

  #6  
Sep 23rd, 2007
omreken means to convert, im writing in dutch language .
and de code is working now thank you .
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 3:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC