Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Left of '::' must be a class/struct/union  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

notpedro

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Left of '::' must be a class/struct/union
« on: November 22, 2014, 10:58:47 am »
I'm unsure if this the right place to ask this so forgive me if this is not supposed to be here but I keep getting the error in the title & despite many searches on the internet I have not been able to find the answer.

Here is the code it relates to:

Graphics.cpp:
#include "Graphics.h"
#include "AppWindow.h"

sf::Sprite g::loadSprite(sf::Texture texture, int ix, int iy, int cx, int cy)
{
}

void g::writeText(sf::Font fontType, const char textValue, const int textSize)
{
}

void g::drawSprite(sf::Sprite, int cx, int cy)
{
}
 

Graphics.h
#ifndef _GRAPHICS_H
#define _GRAPHICS_H

#include "SFML\Graphics.hpp"

class graphics
{
public:
        sf::Sprite loadSprite(sf::Texture texture, int rx, int ry, int ix, int iy);
        void writeText(sf::Font fontType, sf::Text text, const char textValue, const int textSize);
        void drawSprite(sf::Sprite, int cx, int cy);
} g;


#endif

I am very new to using this library as well as c++ so please humor me.
Thanks very much.

Once again sorry if this isn't the right place to put this.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Left of '::' must be a class/struct/union
« Reply #1 on: November 22, 2014, 11:04:30 am »
This forum is about SFML. So yes, this is not the right place to ask basic C++ questions.

And the best I can tell you is: read a C++ book. This language is complicated, you won't learn it on forums.
Laurent Gomila - SFML developer

notpedro

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Left of '::' must be a class/struct/union
« Reply #2 on: November 22, 2014, 11:10:01 am »
Right sorry. Ill delete the thread. Can you recommend and books before I do so?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer

 

anything