gcc 경고 메시지 - warning: no newline at end of file

-> 파일의 끝에 개행문자가 없음

#include <stdio.h>

int main() {

    printf("Hello, World!\n");

    return 0;
}<EOF>

-> warning: no newline at end of file 발생

 

#include <stdio.h>

int main() {

    printf("Hello, World!\n");

    return 0;
}
<Enter>
<EOF>

-> 컴파일 성공

 

설정

트랙백

댓글