int를 지원을 못한다는데..;;
미라
질문 제목 : 질문 내용 : /* 변수와 상수의 사용 예 */
#include stdio.h
/* 파운드를 그램으로 변환하는 상수 */
#define grams_per_pound 454
/* 다음 세기의 시작에 대한상수 */
const int next_century = 2000;
/* 필요한 변수 선언 */
long weight_in_grams, weight_in_pounds;
int year_of_birth, age_in_2000;
main()
{
/* 사용자로부터 데이터 입력 */
printf(enter your weight in pounds: );
scanf(%d,&weight_in_pounds);
printf(enter your year of birth: );
scanf(%d,&year_of_birth);
/* 변환 동작 */
weight_in_grams = weight_in_pounds * grams_per_pound;
age_in_2000 = next_century - year_of_birth;
/* 화면으로 결과 출력 */
printf(\nyour weight in grams = %1d., weight_in_grams);
printf(\nin 2000 you will be %d years old.\n, age_in_2000);
return 0;
}
----------------------------------------------------------------------------------
c:\users\samsung\documents\c++\리스트 3.2\리스트 3.2\변수와 상수의 사용 예를 보여주는 프로그램.cpp(15): error c4430: 형식 지정자가 없습니다. int로 가정합니다. 참고: c++에서는 기본 int를 지원하지 않습니다.
----------------------------
해결방법좀 부탁드릴게요..