我使用以下指南http://rodrigo-silveira.com/opengl-tutorial-parsing-obj-file-blender/#.UTRmkvUudqI矢量:类模板的参数列表:“的std ::矢量缺少”
,因为我试图加载在WebGL的OBJ文件。 在我的RokkoParse.cpp文件中,我使用'vector'。 但我的编译器说“std :: vector丢失”我试图在网络上搜索这个错误,但我无法找到任何好的东西。 有人可以帮我解决我的问题吗?
RokkoParses.h
#pragma once
#include <vector>
#include <string>
#include <iostream>
#include <string>
using std::string;
class RokkoParser
{
public:
public:
static void objToTxt(const string aInFilename,
const string aOutFilename,
bool aVerbose = false);
static std::vector explode(string aStr, char aDelim);
};
RokkoParser.cpp
#include "StdAfx.h"
#include "RokkoParser.h"
#include <cstdio> // instead of <stdio.h>
// #include <conio.h> -- do not use
#include <cstring> // instead of <string.h>
#include "stdafx.h"
#include <iostream>
#include "stdafx.h"
#include<iostream>
#include<conio.h>
#include <string>
#include <iostream>
#include <vector>
#include <string>
#include <iostream>
#include <string>
using namespace std;
vector RokkoParser::explode(string aStr, char aDelim)
{
vector res;
string str = aStr.substr(0, aStr.find(aDelim));
while(str.size() < aStr.size())
{
res.push_back(str);
aStr = aStr.substr(aStr.find(aDelim) + 1);
str = aStr.substr(0, aStr.find(aDelim));
}
res.push_back(str);
return res;
}
在这两个文件,他们说了同样的错误
谢谢!
std :: vector不是一个类型。它是你必须提供参数以使其输入的模板。 – 2013-03-04 10:16:17