Hi, I'm kind of not doing so hot at this whole programming thing. Could someone tell me what I'm doing wrong here?
Code:
//main.cpp
#include <iostream>
#include "pr.cpp"
using namespace std;
int main()
{
p();
return 0;
}
//pr.cpp
#include "pr.h"
int p()
{
return 0;
}
//pr.h
#ifndef _PR_H
#define _PR_H
int p();
#endif
/home/workspace/programming/testing/pr.cpp:2: multiple definition of `p()'
obj/Debug/pointer.o:/home/workspace/programming/testing/pr.cpp:2: first defined here
:: === Build finished: 2 errors, 0 warnings ===
I would appreciate it.