I have a solid understanding of Java, but i'm trying to learn c++ to make a game and because I think c++ is a better language. But i'm having some problems with c++.
#ifndef RENDER_H
#define RENDER_H
#include "shader.h"
class Render
{
public:
Render();
protected:
private:
Shader shader;
};
#endif
Shader
is a class with a string constructor, just declaring it in this class causes an error. If I remove the constructor for Shader
I don't get the error.
Error: render.cpp:3:16: error: no matching function for call to 'Shader::Shader()'
class Shader
{
public:
Shader(const std::string& fileName);
void Bind();
void Update(const Transform& transform, const Camera& camera);
virtual ~Shader();