if else 코드 줄여볼려고 했는데.. 잘 안되네요..

File.GetLength() == 256*256 ? m_height = 256, m_width = 256
:File.GetLength() == 512*512 ? m_height = 512, m_width = 512
:File.GetLength() == 640*480 ? m_height = 480, m_width = 64
:AfxMessageBox(Not Support Image); return 0;

마지막 부분이

else
{
AfxMessageBox(Not Support Image);
return 0;
}

이건데

위에 있는 명령어는 Afx 를 실행해 버리고 빠져나와서 return 0을 실행해 버리네요.. 중괄호처럼 묶는 방법 없나요??ㅠㅠ

댓글 0

아직 댓글이 없습니다.

C언어 다른 글

목록