我使用下OS X的gcc,并试图包括向量执行时,我得到一个错误不能包含<vector>
fatal error: 'vector' file not found
。其他包括如
#include <stdio.h>
#include <stdlib.h>
正在工作。矢量文件位于何处?
我使用下OS X的gcc,并试图包括向量执行时,我得到一个错误不能包含<vector>
fatal error: 'vector' file not found
。其他包括如
#include <stdio.h>
#include <stdlib.h>
正在工作。矢量文件位于何处?
的vector
C++头使得能够使用向量模板类的编译。
包括:
#include<vector>
和使用G ++编译程序。
您是否正在编写C或C++? 'stdio.h'和'stdlib.h'是C包含,而'vector'是C++。 –
您是否尝试过使用'g ++'而不是'gcc'? – WhozCraig
你不能在c中使用vector。 – denis