943,097 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 406
  • C++ RSS
Jan 25th, 2010
0

User defined function, how to manipulate it?

Expand Post »
Hello everyone! I need to ask the user for a function say: X^5 +7 and I need to ask him separately for the value of X, so I can calculate it then. I really don't know how to store the function and then manipulate it!
Thank you!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dimitar is offline Offline
11 posts
since Jan 2010
Jan 25th, 2010
1
Re: User defined function, how to manipulate it?
First step is to just write a program that asks you to enter a value, then use cin to get the value from the keyboard. Once you have that going (compiled without error and runs correctly) you can add the other stuff to it, whic to write a function that contains that formula and returns the result. The function needs one parameter -- the value of x.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2280
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,936 posts
since Aug 2005
Jan 26th, 2010
0
Re: User defined function, how to manipulate it?
Thanks!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dimitar is offline Offline
11 posts
since Jan 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Need Good advice on C++ career path
Next Thread in C++ Forum Timeline: c++ build error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC