I get the error "error C2065: 'View' : undeclared identifier" and "error C2228: left of '.Move' must have class/struct/union".
But the thing is when i right click view and click "Go to Defenition" it finds "...SFML\Graphics\View.hpp(43)".
file "camera.hpp"
#ifndef CAMERA_H
#define CAMERA_H
#include "sfml.hpp"
class camera
{
public:
void view()
{
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
{
View.Move(0, -1);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
{
View.Move(1, 0);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
{
View.Move(-1, 0);
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
{
View.Move(0, 1);
}
}
void zoom()
{
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Add))
{
}
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Dash))
{
}
}
}camera;
#endif