having a problem compiling 2 projects

Oct 15, 2015 at 12:08am
first project:

#include <iostream>


int number(int x, int y);



int main()
{
std::cout << "the sum of 5 and 6 is " << number(5, 6) << std::endl;
return 0;
}



second project:

int number(int x, int y)
{
return x + y;
}
Last edited on Oct 15, 2015 at 12:56am
Oct 15, 2015 at 1:50am
You can't have the code in separate projects. Instead, have the code in the same project but in two different source files.
Topic archived. No new replies allowed.