Re: [C++] how to use fmod in cmath library
From: Jeff Schwab (jeffplus_at_comcast.net)
Date: 03/31/04
- Next message: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Previous message: lallous: "Re: linked list help please."
- Next in thread: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Reply: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 03:33:11 -0500
Rich GK wrote:
> Hi,
>
> The following snippet
>
> #include <cmath>
>
> float num1 = 2001.0;
> float num2 = 4.0;
> float div = std::fmod(num1 / num2); << produced the compile error
That's a syntax error. The comment sequence is "//", not "<<", which is
the left-shift or insertion operator.
> "no matching function for call"
> "candidates are float std::fmod(float, float)"
>
> Now, are these some different kinds of float the function wants (joke).
You only passed in one float, and it's value is two thousand one and
zero tenths, divided by four and zero tenths.
>
> Thanks!
> Rich G Kavanagh.
>
>
>
- Next message: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Previous message: lallous: "Re: linked list help please."
- Next in thread: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Reply: Rich GK: "Re: [C++] how to use fmod in cmath library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|