Hi i have next problem with the number line 12 the file: text.hpp
Here the code
main.cpp#include <iostream>
using namespace std;
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include "object.hpp"
#include "text.hpp"
int main(int argc,char *argv[]){
// Definition
sf::RenderWindow myWindow(sf::VideoMode(800,400,32),"class Text");
Text *Texto1 = new Text;
Texto1->Display(myWindow);
Texto1->SetText("hola");
cout << "\n# Game Over"<< endl;
myWindow.display();
return 0;
}
object.cpp#include "object.hpp"
Object::Object(){}
Object::~Object(){}
void Object::Display(sf::RenderWindow &t){
cout << "Invoked class Object"<< endl;
}
object.hpp#ifndef _objecthpp_
#define _objecthpp_
#include <iostream>
using namespace std;
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
class Object {
public:
Object();
~Object();
virtual void Display(sf::RenderWindow &);
private:
};
#endif
text.hpp#ifndef _texthpp_
#define _texthpp_
#include <iostream>
using namespace std;
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include "object.hpp"
class Text : public Object {
public:
Text();
~Text();
void Display(sf::RenderWindow &);
void SetText(char *);
private:
sf::Text myText;
};
#endif
text.cpp#include "Text.hpp"
Text::Text(){
}
Text::~Text(){
}
void Text::Display(sf::RenderWindow &t){
cout << "Invoked class Text"<< endl;
}
void Text::SetText(char *t){
myText.setString(sf::String(t));
//cout << "Text: "<< string(myText->getString()) << endl;
}