When I tried to run the program, visual studio showed the errors LNK2005 and LNK1169.
I created two source files and I use #include in main file. Could someone tell me why it is wrong
Here is my code in 1.5.3.cpp
#include "stdafx.h"
#include "Print.cpp"
    int main()
{
    double b;
    printf("Input a number\n");
    scanf_s("%lf\n", &b);
    print(b);//call print()
    return 0;
}
And here is my code in Print.cpp
#include "stdafx.h"
void print(double a)
{
    double c = a * 2;
    printf("%lf multyply by 2 is %lf", a, c);
}

 
     
    