D.V.D
Make a wish
- Reaction score
- 73
So I've been getting along my OpenGl tutorial and I came to a problem when writing my texture class. In the class you have a variable that determines the name of the file where the texture is located:
I want to set the value to the actual file name in the constructor of the class but I keep getting the error:
"a value of type "char" cannot be assigned to a value of type "char*""
The method call and the actual method look like this:
How do I get around this problem? The whole chars and const char errors have been coming up for me for a while but I can't find a way around them :S
Code:
char* fileName;
I want to set the value to the actual file name in the constructor of the class but I keep getting the error:
"a value of type "char" cannot be assigned to a value of type "char*""
The method call and the actual method look like this:
Code:
Texture (GLenum TextureTarget, const char& FileName);
Code:
Texture::Texture (GLenum TextureTarget, const char& FileName) {
textureTarget = TextureTarget;
fileName = FileName;
}
How do I get around this problem? The whole chars and const char errors have been coming up for me for a while but I can't find a way around them :S