error: expected identifier or '(' before '}' token

error: expected declaration before '}' token

위 두 메시지는 중괄호를 열지 않고 닫았을 때 발생했다.

#include <stdio.h>

void test() /*	error	*/
    printf("asdf");
}
void test(){
    int a;
}

int main()
{

}

 

 

visual studio, visual studio code에서는 오류 원인을 자세하게 설명해준다.