So I'm trying to make typewriting effect print in C++ and the error is the script give me the final result instead of the typewriting effect.
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
int main() {
std::string d1 = "\"Starting in 3, 2, 1...\"";
for(int i = 0; i < sizeof(d1); i++){
std::cout << d1[i];
sleep(1);
}
}