class A { public: int data[2]; int &x, &y; A(): x(data[0]), y(data[1]) {} A( int xx, int yy ): x(data[0]),…
void aaa( char* str ) { … } 일 때, aaa( “abcdefg” ); 라고 실행하면 발생하는 에러이다. 두 가지의 해결방법이 있다. 첫 번째, void aaa(…
Visual Studio 가 update되면서 “버퍼 보안 검사 (/GS-)” 항목이 문제가 될 수 있다.
class A { public: int a, b; A(): b(0), a(0) {} }; 만약 위와 같은 code를 사용했을 때, gcc에서 다음과 같은 warning이…
OpenCV 2.0 사용시 다음과 같은 compile error가 발생할 수 있다. /usr/include/opencv/cxcore.hpp:266: error: expected unqualified-id before numeric constant 이것은 Complex라는 자료형이 이미 linux에서 사용되고 있기 때문이다.…
“undefined refernce to…” 이러한 error는 source code에서 어떤 외부 library를 사용하지만 해당 library가 link되어 있지 않아서 code 내용을 가져올 수 없기 때문에 발생하는 error이다. 여기서는…
class A { public: float x; A(): x(0) {} }; std::vector av; A a; av.push_back( a ); 했을 때, can’t use default…
Visual Studio에서 다음과 같은 compile error가 발생할 때가 있다. UTL error C2872: ‘ostream’ : ambiguous symbol 이럴 때에는 C/C++ -> Preprocesser -> Preprocessor Definations에 REQUIRE_IOSTREAM를…
다음과 같은 error가 발생할 때, C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\windef.h(122) : warning C4005: ‘CALLBACK’ : macro redefinition C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\GL/glut.h(34)…
compile시 다음과 같은 error가 발생할 때, warning LNK4099: PDB ‘vc80.pdb’ was not found with라이브러리 compile시에 라이브러리 종속성 입력 사용(Link Library Dependency)를 예(Yes)로 바꿔주면 된다.
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(406) : error C2381: ‘exit’ : redefinition; __declspec(noreturn) differs C:\Program Files\Microsoft Visual Studio 8\VC\include\GL/glut.h(146) : see declaration of ‘exit’ \sourceCode\main.cpp(362) :…