I am creating a code, and I'm getting this weird error. I'm sure its a stupid mistake, but I can find it.

multiple definition of `Start()'
first defined here
ld returned 1 exit status
C:\Documents and Settings\Andrew\My Documents\projects\equation\Makefile.win [Build Error] [equation.exe] Error 1

And here is the code:

using namespace std;

void Start ();

int e, ecount, multiplicator, mcount, answer;

void
Start ()
{
      e = 0;
      ecount = 0;
      cout << "Welcome to X-solve. This program is designed to solve almost any mathamatical equation that \n includes a variable. For example: 6*x=12. The program would then solve x, which would be 2.\n\n";

           cout << "To start, enter the outcome to the equation: (for example, 6*x=12. 12 would be the outcome)\n";
           cin >> ecount;
           e = ecount;
           cout << "Thanks! Now enter the multiplicator: (6*x=12. 6 would be the multiplicator)\n";
           cin >> mcount;
           multiplicator = mcount;
           answer = e/multiplicator;
           cout << "Finished.\n " << multiplicator << "*x=" << e << "\n x=" << answer << "";
           }

Recommended Answers

All 4 Replies

Here is a version of your code that worked for me

#include <iostream>
using namespace std;



int e, ecount, multiplicator, mcount, answer;

int main(int nargs,char* args[])
{
      e = 0;
      ecount = 0;
      cout << "Welcome to X-solve. This program is designed to solve almost any mathamatical equation that \n includes a variable. For example: 6*x=12. The program would then solve x, which would be 2.\n\n";

           cout << "To start, enter the outcome to the equation: (for example, 6*x=12. 12 would be the outcome)\n";
           cin >> ecount;
           e = ecount;
           cout << "Thanks! Now enter the multiplicator: (6*x=12. 6 would be the multiplicator)\n";
           cin >> mcount;
           multiplicator = mcount;
           answer = e/multiplicator;
           cout << "Finished.\n " << multiplicator << "*x=" << e << "\n x=" << answer << "";
    system("pause");
    return 0;
           }

You didnt include iostream for the cin/couts or have a main function.

hmmm, still gettting same error with that code.

Worked for me. Post your compiler and options.

Where is your main() function?

And please read the Rules, especially this section about thread titles.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.