[질문]입력한 숫자값 구분

comlover의 이미지

안녕하세요
c 또는 C++ 프로그래밍에서 입력한 숫자값이 integar형인지 float형인지 어떻게 구분할 수 있을까요?

fromdj의 이미지

there is simple way.
Process the input as a string.
and check whether it have dot (.) character or not~

^^ be cool ~
http://fromdj.pe.kr

익명 사용자의 이미지

오 그렇게 하면 되겠네요.
감사합니다.