You've partially answered my question already, I've fixed the code thanks to your critique and the if statement I've written works fine, my problem is that I just haven't gotten it to work in the GUI window as text, I can only get it to work in the console. What I need is to get things like basic if statements like this working in the actual GUI window as SFML text rather than just a console application and your point about C++ and SFML got me thinking again because yes there's C++ already in it so I guess I just need to think about it more.
The way I've been learning is using the documentation from SFML, cprogramming tutorials
http://www.cprogramming.com/tutorial/c++-tutorial.html and of course searching through the internet to see if my questions have already been answered ages ago. If you can recommend me a good C++ book that's up to date that would be nice, the problem is a lot of the books I've seen are even more outdated sometimes than the tutorials so it's pretty unhelpful for a newbie like me I think so you may as well give that sort of thing to someone who already knows the code.
The reason as well I'm not sure about using the SFML text input is of course many games use statistics and numbers so I'm not sure that command could cope with having numbers update themselves constantly unless I'm missing something.
Here's the updated code:
#include <iostream>
#include <SFML/Graphics.hpp>
int main ()
{
sf::RenderWindow window(sf::VideoMode( 800, 600 ), "C++ Programming Test");
sf::Font arial;
if ( !arial.loadFromFile ( "arial.ttf" ) )
{ }
sf::Text lineone;
lineone.setFont( arial );
lineone.setCharacterSize ( 12 );
lineone.setPosition ( 340, 280 );
while (window.isOpen())
{
{
using namespace std;
int numberinput;
cout<< ( "Type in a number: " );
cin>> numberinput;
cin.ignore();
if ( numberinput < 10 ){
cout<< ( "Death, you entered too low a number" );
}
}
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw ( lineone );
window.display();
}
return 0;
}
Note: I'm aware of what the OpenGL.hpp does, it enables OpenGL but I guess I'll keep it simple now and save that for later