Re: Combining Functions

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • Re: Combining Functions
    ... request, I have got to the part where i have to program the equations ... and i cant seem to get them to link together. ... enters his radians i was to link to a sin x function to calculate the ... There should be no need to program sin and cos functions yourself. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: More on Dame Stella Rimingtons converstion with me
    ... KGB do there that you are linking to me? ... The answer to that Mike, is, she cant and wont tell you, its still an ...
    (uk.legal)
  • Re: 3D Support for NVIDIA
    ... drivers. ... cant understand,here,why all r thinking like this. ... My father, Victor Moore used to say: ... ..the Sin of Ignorance, ...
    (Fedora)
  • when hyperlinking - getting "400 bad request" message
    ... wehn hyperlinking to one specific graphic site I keep getting "400 bad ... request" message. ... (all other linking went just fine) ... diane c. ...
    (microsoft.public.frontpage.programming)
  • hyperlinking message errors
    ... When linking to one particular graphic site I keep getting a "400 bad ... request" message and can't link. ... All other hyperlinking was fine. ...
    (microsoft.public.frontpage.client)