헤더 파일에 몇 가지 오류가 있는데, C++을 처음 사용하기 때문에 수정 방법을 모르겠습니다.C++ 헤더 파일 - 문법 문제
여기 헤더 파일의 코드 : 오류가
#pragma once
typedef unsigned int uint;
class DCEncryption
{
public:
static char* manageData(char*, char*, uint);
private:
static int max(int, int);
static uint leftRotate(uint, int);
};
그리고 현재 위치 :
- dcencryption.h(12): error C2062: type 'int' unexpected
- dcencryption.h(12): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
- dcencryption.h(12): error C2760: syntax error : expected '{' not ';'
- dcencryption.h(13): error C2144: syntax error : 'uint' should be preceded by '}'
- dcencryption.h(13): error C2143: syntax error : missing ')' before ';'
- dcencryption.h(13): error C2059: syntax error : ')'
- dcencryption.h(13): error C2143: syntax error : missing ';' before ')'
- dcencryption.h(13): error C2238: unexpected token(s) preceding ';'
일부 컴파일러를 믿는다면'uint'는'unsigned int'를 위해 예약 된 키워드입니다. 내가 잘못했을 수도 있지만 명명 체계를 변경해보십시오. – Drise
@Drise - 당신이 기억하는 것이 사실 C#이 아니라면 그렇게 할 것 같지 않습니다. –
@ JirkaHanika 어쨌든 그것은 일종의 매크로 또는 '#define'충돌 인 것 같습니다. 나는 아직도 명명 충돌을 비난한다. – Drise