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

Author Topic: sf::RenderWindow returns NULL pointer  (Read 920 times)

0 Members and 1 Guest are viewing this topic.

jerryd

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
sf::RenderWindow returns NULL pointer
« on: October 04, 2020, 05:04:40 am »
SFML forum,
 Windows 7

 I'm using SFML-2.5.1 with Visual Studio 2017.
 My program builds without any errors but I get an exception thrown because
 sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
 returns a NULL pointer.  Here's the entire program:

#include <SFML\Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
   window.close();
   return 0;
}

 I must be missing something.

jerryd

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9941
    • View Profile
    • development blog
    • Email
Re: sf::RenderWindow returns NULL pointer
« Reply #1 on: October 06, 2020, 08:51:37 am »
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
 returns a NULL pointer.  Here's the entire program:
The construction of a class never returns anything.

Maybe describe your problem by providing some details. What do you want to achieve and what exactly is happening?
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

 

anything