Hi, guys. I'm new and a terribly slow learner...learning to program...c++. Great combination. I get hung up on stuff like why functions are given the names they are. For example in the following code I understand everything until I get to where we access the "pollEvent" function.
int main()
{
sf::Window window;
window.create(sf::VideoMode(600, 600), "Window");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
}
}
Being an idiot, and a visual learner, I think of the window object accessing a function called pollEvent. Now when I think of pollEvent, I think of an event where someone is voting...that doesn't make sense to me, so then I research the definition of poll and other than voting, it can be described as a noun being "a head". I am such a dumbass. This doesn't make any sense to me. Can someone explain to me in layman terms why pollEvent is called what it is so I can remember and understand exactly what it does? Thanks guys.