나는 헤더 파일을 정의한다 "check.h
"는 struct
다음 C++ : 헤더 파일에서 선언 구조체 리턴 형 기능
#ifndef CHECK_H
#define CHECK_H
#include<string>
struct Test{
std::string check;
};
#endif
내가 다른 헤더 파일을 반환으로 다음과 같은 기능을 가지고있다 "
test.h
" 위에서 정의 된
struct Test
로 입력
#ifndef TEST_H
#define TEST_H
#include<string>
#include "check.h"
Test display(std::string);
#endif
그러나 심지어이 헤더 파일에 "check.h"
을 포함에
unable to resolve identifier
오류가 발생합니다. 이 문제를 해결하려면 어떻게해야합니까?
코드를 게시 할 수 있습니까? 아니면 적어도 더 많이? – StevieG
'#include'와'std :: string'을 사용 했나요 아니면 헤더에'string' 이름을 넣었습니까? –
juanchopanza
이 C 또는 C++입니까? C에서는'struct test'가 필요하며'string'이 게시 된 코드 또는'typedef'에서'std :: string'인지 확실하지 않습니다. – hmjd