문자 통계를 보관할 간단한 구조체를 만들려고했습니다.오류 :이 선언에는 저장소 클래스 나 형식 지정자가 없습니다 (간단한 구조체를 만들었습니다.)
struct cStats
{
int nStrength;
int nIntelligence;
int nMedical;
int nSpeech;
int nAim;
};
cStats mainchar;
mainchar.nStrength = 10;
mainchar.nIntelligence = 10;
mainchar.nMedical = 10;
mainchar.nSpeech = 10;
mainchar.nAim = 10;
mainchar :
이 내가 생각 해낸 것입니다. 부분은 Visual Studio에서 빨간색으로 밑줄이 그어져 있고 위에 마우스를 올려 놓으면 다음과 같이 표시됩니다. 오류 :이 선언에는 저장 클래스 또는 형식 지정자가 없습니다
왜이 작업을 수행하는지, 그리고 내가 수정해야하는 작업에 대한 설명 그것은 인정 될 것이다.