-
카테고리
-
세부 분야
프로그래밍 언어
-
해결 여부
미해결
강의 중 오버플로우(overflow)란 warning 이 보이질 않습니다.
20.09.11 00:26 작성 조회수 246
1
결과 값은 수업 진행대로 잘 나오나 output에서 overflow 워닝이 나오질 않습니다. 답변 부탁드리겠습니다.
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <limits.h>
//#include <stdlib.h>
int main()
{
unsigned int u_max = UINT_MAX + 1;
printf("%u", u_max);
//// i to binary representation
//char buffer[33];
//_itoa(u_max, buffer, 2);
//// print decimal and binary
//printf("dicimal:%u\n", u_max);
//printf("binary:%s\n", buffer);
return 0;
}
1>------ Build started: Project: Lecture1, Configuration: Debug Win32 ------
1>Lecture1.c
1>C:\C\Lecture\Lecture\Lecture1\Lecture1.c(1,1): warning C4005: '_CRT_SECURE_NO_WARNINGS': macro redefinition
1>C:\C\Lecture\Lecture\Lecture1\Lecture1.c : message : see previous definition of '_CRT_SECURE_NO_WARNINGS'
1>Lecture1.vcxproj -> C:\C\Lecture\Lecture\Debug\Lecture1.exe
1>Done building project "Lecture1.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
답변을 작성해보세요.
1
답변 2