[C++] string 선언시 에러

kldpzone의 이미지

코딩을 하는데 string 선언에서 에러가 납니다. 다른 곳에서도 string을 선언해서 사용하는데 그곳은 괜찮았는데 몇 줄 안되는 곳에서 에러가 나니 살펴봐도 잘못된 곳을 못찾겠습니다.

#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>

struct amino {
	double mass;
	string name;
};

1>c:\Mass.h(13) : error C2146: syntax error : missing ';' before identifier 'name'
1>c:\Mass.h(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\Mass.h(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
philossh의 이미지

namespace 지시자를 사용하셨는지??

To be or not to be.
That is the question.

kldpzone의 이미지

소스가 1000줄이 넘어가도록 짜면서 namespace도 확인 안하다니..
제가 정말 멍청했습니다.
100개가 넘는 에러가 싹~ 없어졌습니다.