VC中如何使用STL
使用vc6,C++ Source File, 代码如下:
#include <iostream.h>
#include <vector>
using namespace std;
typedef vector<int> INTVECTOR;
const ARRAY_SIZE=4;
void main(void)
{
INTVECTOR theVector;
for (int i=0;i<ARRAY_SIZE;i++)
theVector.push_back((i+1)*100);
cout<<theVector.front()<<endl;
}
编译结果:
Compiling...
Error spawning cl.exe
该如何解决?