Guest User

Untitled

a guest
Jun 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. TestDLL.h
  2.  
  3. #ifndef __TESTDLL__
  4. #define __TESTDLL__
  5.  
  6. class TestDLL
  7. {
  8. private :
  9. static int _testint;
  10.  
  11. public:
  12. static int GetTestInt() { return _testint;}
  13.  
  14. TestDLL();
  15. }
  16.  
  17. #endif // __TESTDLL__
  18.  
  19.  
  20.  
  21. TestDLL.cpp
  22.  
  23.  
  24. #include <iostream>
  25. using namespace std;
  26.  
  27.  
  28. #include "TestDLL.h"
  29.  
  30.  
  31. int TestDLL::_testint = 100;
  32.  
  33.  
  34. TestDLL::TestDLL()
  35. {}
  36.  
  37.  
  38. 1>------ Build started: Project: TestDLL, Configuration: Debug Win32 ------
  39. 1> TestDLL.cpp
  40. 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2628: 'TestDLL' followed by 'int' is illegal (did you forget a ';'?)
  41. 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2371: '_testint' : redefinition; different basic types
  42. 1> d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.h(10) : see declaration of '_testint'
  43. 1>d:\users\cameron garnham\documents\dev\dlltest\testdll\testdll.cpp(9): error C2440: 'initializing' : cannot convert from 'int' to 'TestDLL'
  44. 1> No constructor could take the source type, or constructor overload resolution was ambiguous
  45. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Add Comment
Please, Sign In to add comment