trail.cpp
Code:
#include <cmath>
#include <iostream>
using namespace std;
int find(double, double);
int main(void){
double num, pos;
cout << "Please enter a positive integer and the number of";
cout << "trailing digits: ";
cin >> pos >> num;
find(pos,num);
}
find.cpp
Code:
#include <cmath>
#include <iostream>
using namespace std;
void find(double pos,double num){
int trail;
trail = pos % pow(10.0,num);
cout << endl;
cout << "The "<<num<<" trailing digits of "<<pos<<" are ";
cout << trail<<".\n";
}
the error is: Line 19 is just below int main (void) in trail.cpp
Code:
find.cpp: In function ‘void find(double, double)’:
find.cpp:19: error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator%’
I appreciate any help up front