In PpmReader.cpp, I have:
#include "PpmReader.h"
PpmReader::PpmReader() {
textureID = 0;
}
// line 26
int PpmReader::load(string filename) {
// some stuff
}
In PpmReader.h, I have:
#ifndef PPMREADER_H
#define PPMREADER_H
#include <stdio.h>
#include <malloc.h>
#include <string>
#include <GL/glut.h>
class PpmReader {
private:
GLuint textureID;
public:
PpmReader();
int load(string filename);
};
#endif
I get this error:
PpmReader.cpp(26) : error C2065: 'string' : undeclared identifier
Why? Didn’t I include the string library?