Re: Combining Functions
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Mon, 13 Nov 2006 18:07:39 -0500
Nutkin wrote:
Hi i have to program a code to perform 1 of 5 functions at the users
request, I have got to the part where i have to program the equations
and i cant seem to get them to link together. Basicly when the used
enters his radians i was to link to a sin x function to calculate the
sin of the number also there will be a factorial function and a cos
function. but none of them are linking.
[snip]
Well, for starters you should be passing the value of x to the functions as an an argument. The x in your main() is a local variable, so there is no way the functions can see it (and global variables in C++ are bad anyway).
What do you mean by "not linking" ?
David Wilkinson
.
- References:
- Combining Functions
- From: Nutkin
- Combining Functions
- Prev by Date: Re: Combining Functions
- Next by Date: Re: How to purposefully put an Assertion failure into Finalize() for debug builds using C++/CLI syntax?
- Previous by thread: Re: Combining Functions
- Next by thread: Combining Functions
- Index(es):
Relevant Pages
|