These are the errors I get using Visual Studio
1>------ Build started: Project: DEMO2, Configuration: Debug Win32 ------
1>Compiling...
1>rng.cpp
1>main.cpp
1>Generating Code...
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>main.obj : error LNK2005: "public: __thiscall aRandomNumberGenerator::aRandomNumberGenerator(voi d)" (??0aRandomNumberGenerator@@QAE@XZ) already defined in rng.obj
1>main.obj : error LNK2005: "public: void __thiscall aRandomNumberGenerator::setSeed(unsigned long)" (?setSeed@aRandomNumberGenerator@@QAEXK@Z) already defined in rng.obj
1>main.obj : error LNK2005: "public: double __thiscall aRandomNumberGenerator::generate(void)" (?generate@aRandomNumberGenerator@@QAENXZ) already defined in rng.obj
1>C:\Users\Neesha\Documents\Visual Studio 2008\Projects\DEMO2\Debug\DEMO2.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:\Users\Neesha\Documents\Visual Studio 2008\Projects\DEMO2\Debug\BuildLog.htm"
1>DEMO2 - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========