I have just started getting into SFML and Visual studio as well . I have always worked on turbo c++ . I am not sure I understand the very first code that I have come across while getting into SFML . Here is the program..
#include<iostream>
#include<SFML\System.hpp>
int main()
{
sf::Clock Clock;
sf::Sleep(0.1f);
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}
I know this is probably the most basic thing ever . But I have a few questions .
Q1. What is 'sf' ? Is it a class ?
Q2. Why is the operator '::' being used here ?
Q3. Is 'Clock' a class as well?
Q4. what does the 'f' represents in sleep(0.5f)?
Q5. Why can't we use 'getch()' in visual studio? (I am a beginner)