• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

강의 중 오버플로우(overflow)란 warning 이 보이질 않습니다.

20.09.11 00:26 작성 조회수 215

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 ==========

답변 2

·

답변을 작성해보세요.

3

Hello Yeo님의 프로필

Hello Yeo

2020.09.11

안녕하세요?
Visual studio가 업데이트를 통해서 조금 바뀐 모양이네요. 아래 아이콘을 확인해보셨으면 좋겠습니다.
 

Echapper4님의 프로필

Echapper4

2022.02.10

감사합니다!!

Hello Yeo님의 프로필

Hello Yeo

2022.02.13

화이팅~

1

JA KIM님의 프로필

JA KIM

질문자

2020.09.11

빠른 답변 정말 감사합니다. 그림과 같이 확인하니,

C26450  Arithmetic overflow 라고 잘 나옵니다.