Try this -
#include <iostream>
#include <windows.h>
#include <WinUser.h>
#define OCR_NORMAL 32512
int main()
{
std::cout << "Hello World!\n";
auto wait_cursor = ::CopyIcon(::LoadCursor(nullptr, IDC_WAIT));
// Documentation says that the system will destroy wait_cursor
::SetSystemCursor(wait_cursor, OCR_NORMAL);
std::cout << "load cursor was set\n";
system("pause");
::SystemParametersInfoA(SPI_SETCURSORS, 0, NULL, SPIF_SENDCHANGE);
std::cout << "Cursors have been reset\n";
}