편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
7번째 줄: | 7번째 줄: | ||
==한줄 주석== | ==한줄 주석== | ||
*<code>//</code> 를 추가하면 그 줄은 모두 주석으로 처리됨. | *<code>//</code> 를 추가하면 그 줄은 모두 주석으로 처리됨. | ||
< | <source lang='C++'> | ||
#include <iostream> | #include <iostream> | ||
using namespace std; | using namespace std; | ||
17번째 줄: | 17번째 줄: | ||
return 0; | return 0; | ||
} | } | ||
</ | </source> | ||
==여러줄 주석== | ==여러줄 주석== | ||
*<code>/*</code>와 <code>*/</code> 사이에 들어가는 설명은 모두 주석 처리됨. | *<code>/*</code>와 <code>*/</code> 사이에 들어가는 설명은 모두 주석 처리됨. | ||
< | <source lang='C++'> | ||
#include <iostream> | #include <iostream> | ||
using namespace std; | using namespace std; | ||
40번째 줄: | 40번째 줄: | ||
return 0; | return 0; | ||
} | } | ||
</ | </source> | ||
*<code>//</code>가 오는 줄의 끝에 백슬래시(<code>\</code>)를 넣으면 그 다음 줄도 주석 처리됨. | *<code>//</code>가 오는 줄의 끝에 백슬래시(<code>\</code>)를 넣으면 그 다음 줄도 주석 처리됨. | ||
< | <source lang='C++'> | ||
#include <iostream> | #include <iostream> | ||
using namespace std; | using namespace std; | ||
59번째 줄: | 59번째 줄: | ||
return 0; | return 0; | ||
} | } | ||
</ | </source> | ||
*<code>#if 0</code>와 <code>#endif</code> 사이에 들어가는 설명은 모두 주석 처리됨. | *<code>#if 0</code>와 <code>#endif</code> 사이에 들어가는 설명은 모두 주석 처리됨. | ||
< | <source lang='C++'> | ||
#include <iostream> | #include <iostream> | ||
using namespace std; | using namespace std; | ||
83번째 줄: | 83번째 줄: | ||
return 0; | return 0; | ||
} | } | ||
</ | </source> | ||
==같이 보기== | ==같이 보기== |