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

Author Topic: SFML Book chapter 2 question  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

Michalus

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
SFML Book chapter 2 question
« on: August 01, 2013, 07:07:10 pm »
I read at this moment the sfml development book.
I am at chapter 2 before the headline Error handling.
There stand at the TextureHolder class, two get methods
first:
sf::Texture& get (Textures::ID id);
 
second:
const sf::Texture& get (Textures::ID id) const;
 

But I dont understand the sense of the second method.
The methods do  actually almost the same.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML Book chapter 2 question
« Reply #1 on: August 01, 2013, 07:10:11 pm »
Yes they do almost the same. So what's the difference? What do those const mean? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Back to C++ gamedev with SFML in May 2023