How to include a function in 2 .cpp files in the same project in Visual Studio 2010?

  • Thread starter Thread starter farooq.hnf
  • Start date Start date
F

farooq.hnf

Guest
i have a function made by me that i want to use in to .cpp files in a single project. For this purpose i have pasted that function (both declaration and definition) in a header file which is also made by me. when i include the header file in any one of the two .cpp files and call the function it works really fine.... but when i try to include the header file in both .cpp files and then call the function from both files... the compiler claims: redifinion of function ..... what should i do?


farooq.hnf

Continue reading...
 
Back
Top