title: SFML error from loadFromFile Absolute path
body: <pre class="lang-cpp prettyprint-override"><code>#include &lt;SFML/Window.hpp&gt;
  #include &lt;SFML/Graphics.hpp&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
      sf::RenderWindow window(sf::VideoMode(600,600), &quot;sfml work&quot;);//윈도우 명령어 지칭하는 대상의 이름이 window라고 하는거다. 
      sf::Sprite background;
      sf::Texture texture;    
      
      if (!texture.loadFromFile(&quot;firepunch.png&quot;))
      {
          std::cout&lt;&lt; &quot;ERROR&quot; &lt;&lt; std::endl;
      }
  
      background.setTexture(texture);
  
      while (window.isOpen()) //만약 윈도우창이 열린다면
      {
          sf::Event ss; // Event는 명령어 이벤트 이름이 ss라고 하는거다 명령어+명령어 이름 순인듯
          
          while (window.pollEvent(ss))
          {
              switch (ss.type)
              {
              case sf::Event::Closed:
                  window.close();
                  break;
  
              case sf::Event::Resized:
                      sf::FloatRect visibleArea(0, 0, ss.size.width, ss.size.height);
                      window.setView(sf::View(visibleArea));
                      break;
              }
          }
          window.clear();
          window.draw(background);
          window.display();
  
      }
      return 0;
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/KgNCu.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I am beginner of sfml when write this code debuger says this code have excess error. I think &quot;if (!texture.loadFromFile(&quot;firepunch.png&quot;))&quot; is error but i can fix it 3 hours. search a google but can't find the solution. this error says 'while read 0xC0000005: 0x00000000 An access violation has occurred.' please help me.... what can i do?</p>