大佬教程收集整理的这篇文章主要介绍了在编译时编译Xcode中的C类错误:stl vector,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
boid.h:
#ifndef BOID_CLASS_HEADER_DEFInes_H #define BOID_CLASS_HEADER_DEFInes_H #include "defines.h" class Boid { public: // Initialize the boid with random position,heading direction and color Boid(float SceneRadius,float NormalVel); ..... protected: ... }; #endif
并在boid.cpp中:
#include "Boid.h" // Initialize the boid with random position,heading direction and color Boid::Boid(float SceneRadius,float NormalVel) { .... }
Compiling Boid.h: "error: vector: No such file or directory"
有任何想法吗?我以为你可以使用C/C++代码并在xcode中编译没有问题?
谢谢
编辑:添加了define.h(也添加了#endif样本,但是在原始代码中)
编辑2:我有一个不同的错误后,注释掉几个包括有空:上面的向量错误.
#ifndef BOID_NAV_DEFInes_H #define BOID_NAV_DEFInes_H #include <stdlib.h> #include <vector> #include "Vector3d.h" #include "Point3d.h" #include "win_layer.h" #endif
以上是大佬教程为你收集整理的在编译时编译Xcode中的C类错误:stl vector全部内容,希望文章能够帮你解决在编译时编译Xcode中的C类错误:stl vector所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。