Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TestDLL.h
- #ifndef __TESTDLL__
- #define __TESTDLL__
- class TestDLL
- {
- private :
- static int _testint;
- public:
- static int GetTestInt() { return _testint;}
- TestDLL();
- }
- #endif // __TESTDLL__
- TestDLL.cpp
- #include <iostream>
- using namespace std;
- #include "TestDLL.h"
- int TestDLL::_testint = 100;
- TestDLL::TestDLL()
- {}
- 1>------ Build started: Project: TestDLL, Configuration: Debug Win32 ------
- 1> TestDLL.cpp
- 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2628: 'TestDLL' followed by 'int' is illegal (did you forget a ';'?)
- 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2371: '_testint' : redefinition; different basic types
- 1> d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.h(10) : see declaration of '_testint'
- 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2440: 'initializing' : cannot convert from 'int' to 'TestDLL'
- 1> No constructor could take the source type, or constructor overload resolution was ambiguous
- ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Add Comment
Please, Sign In to add comment