#1 - This line:
Code:
compoundInterest CompoundInterest(double principle, double rate, int time);
is a prototype for a function named CompoundInterest that returns a value of type compoundInterest. It is not an object named CompoundInterest of type compoundInterest which is what you want. There is a difference between that and:
Code:
compoundInterest CompoundInterest(principle,rate,time);
#2
Code:
int main(int argc, const char * argv[])
{
double principle;
double rate;
int time;
compoundInterest CompoundInterest(double principle, double rate, int time);
cout<<"Enter the Priciple: "<<endl;
cin>>principle;
cout<<"Enter the Rate:"<<endl;
cin>>rate;
cout<<"Enter the duration of the loan:"<<endl;
cin>>time;
Here you input values into your variables but this occurs after your failed attempt to create an object so even if you got that right it still wouldn't work since the variables would first need to have valid values before you sent them to your object.
You need to correct the creation of your object and then either put that creation step after the user has entered values or use the length/percent/startingAmount member function to set the appropriate values before you call the calculate member function.