c++ - Undefined reference to '(all my functions)' -


i'm getting these errors:

undefined reference 'getlength()'
undefined reference 'getwidth()'
undefined reference 'getarea(double, double)'
undefined reference 'displaydata(double, double, double)'

here's code:

#include <iostream>  using namespace std;  double getlength(); double getwidth(); double getarea(double,double); void displaydata(double,double,double);  int main() {     double length;     double width;     double area;      length = getlength();     width = getwidth();     area = getarea(length,width);     displaydata(length,width,area);      return 0; }  //getlength function double getlength(); {      double length;     cout << "length: ";     cin >> length;      return length;  }  //getwidth function double getwidth(); {     double width;     cout << "width: ";     cin >> width;      return width; }  //getarea function double getarea(double lenght, double width); {     return length*width; }  //displaydata function void displaydata(double length, double width, double area); {     cout << "\nrectangle data\n"         << "---------------\n"         << "length: " << length << endl         << "width: " << width << endl         << "area: " << area << endl;  } 

other missing parenthesis (}) @ end of main, shouldn't have semicolons in function definitions:

double getlength(); <-- should not there {     .... } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -