I can't fix this one error
Nov 12, 2015 at 5:58pm UTC
I've tried everything to fix this, any help is greatly appreciated, this is the only error I'm getting: 1>Source.obj : error LNK2019: unresolved external symbol "float __cdecl calctotaltime(int,float)" (?calctotaltime@@YAMHM@Z) referenced in function _main
1>E:\Project1\Debug\Project1.exe : fatal error LNK1120: 1 unresolved externals
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#include <iostream>
using namespace std;
//Function prototypes
int collectdvdmins ( int dvdmins );
float calctotaltime ( int dvdmins, float totaltime );
void displayoutput ( int dvdmins, float totaltime );
int main ( )
{
int dvdmins = 0;
float totaltime = 0;
dvdmins = collectdvdmins ( dvdmins );
totaltime = calctotaltime ( dvdmins, totaltime );
displayoutput( dvdmins, totaltime );
system ("PAUSE" );
return 0;
}
//Function Defintions
int collectdvdmins ( int dvdmins )
{
cout << "Enter the total DVD runtime in minutes./n" ;
cin >> dvdmins;
return dvdmins;
}
float calctotaltime (int dvdmins, float totaltime )
{
totaltime = dvdmins/60;
return totaltime;
}
void displayoutput ( int dvdmins, float totaltime )
{
cout<< "DVD runtime\n\n" ;
}
Nov 12, 2015 at 8:00pm UTC
runs without error for me.
Nov 12, 2015 at 8:07pm UTC
Try cleaning and rebuilding the project.
Topic archived. No new replies allowed.