this is how it must look, in console application:
int main()
{
string arr = "hello world";
for (int i = 0; i < arr.size(); i++)
{
cout << arr[i];
Sleep(1000);
}
}
i also think it should look something like this in sfml:
std::string b;
std::string arr = "hello world";
while (window.isOpen())
{
float time = clock.getElapsedTime().asMilliseconds();
time = time / 1000;
if (time > 1)
{
for (int i = 0; i < arr.size(); i++)
{
b += arr[i];
e++;
clock.restart();
}
}
a.setString(b);
window.draw(a);
}
but it doesn't work how i need, any hints please?