728x90
반응형
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 일부 컴파일러에서는 컴파일이 성공합니다. (https://godbolt.org/) | |
// 하지만 실행 시에는 오류가 발생합니다. | |
// 왜 인지는 한번 생각을 해보신 뒤, 컴파일러 종류별 오류를 검사해 보십시오. | |
// 출처: http://j2doll.tistory.com/478 [어쩌다가 휴식 중] | |
#include <iostream> | |
using namespace std; | |
int add( int a ) { return (a+1); } | |
int main(int argc, char* argv[]) | |
{ | |
int i = add( i ); // RUN-TIME ERROR | |
return 0; | |
} |
728x90
반응형
'C C++' 카테고리의 다른 글
Qt Polymorphism (0) | 2012.03.06 |
---|---|
CStdString : 윈도우즈 문자열 클래스 (0) | 2012.02.27 |
[StudioStyles] 비주얼 스튜디오 색 변경 (Visual Studio Color Shceme) (0) | 2011.09.18 |
C 언어의 선대 언어 계승 기능 (0) | 2011.07.31 |
[beautiful code] A Regular Expression Matcher : Brian Kernighan & Rob Pike (0) | 2011.07.28 |