em khai báo 1 lớp như sau:
Code:
------------------------------arrword.h--------------------------------
#ifndef _arrword_0612739
#define _arrword_0612739
class CArrWord
{
private:
int iWord;
vector<string> ArrWord;
public:
CArrWord();
~CArrWord();
}
#endif;
Code:
---------------------------arrword.cpp-------------------------------------
#include "iostream"
#include "vector"
#include "fstream"
#include "arrword.h"
using namespace std;
//.....
báo lỗi:
--------------------Configuration: ArrWord - Win32 Debug--------------------
Compiling...
ArrWord.cpp
d:\bai tap c++\baitapthuchanh\arrword\arrword.h(9) : error C2143: syntax error : missing ';' before '<'
d:\bai tap c++\baitapthuchanh\arrword\arrword.h(9) : error C2501: 'vector' : missing storage-class or type specifiers
d:\bai tap c++\baitapthuchanh\arrword\arrword.h(9) : error C2059: syntax error : '<'
d:\bai tap c++\baitapthuchanh\arrword\arrword.h(9) : error C2238: unexpected token(s) preceding ';'
D:\BAI TAP C++\BAITAPTHUCHANH\ArrWord\ArrWord.cpp(5) : error C2143: syntax error : missing ';' before 'using'
Error executing cl.exe.
ArrWord.exe - 5 error(s), 0 warning(s)
Mong các huynh giúp đệ cái này!