#include <iostream>
#include <chrono>
#include <thread>
int main() {
const int width = 50;
for (int x = 0; x < width; x++) {
std::cout << "\r"; // return to line start
std::cout << std::string(x, ' ') << '@'; // move @ to position x
std::cout.flush(); // force output
std::this_thread::sleep_for(std::chrono::milliseconds(80));
}
}
/*
run:
@
*/