fix: add missing <cstdio> include and flush stdout explicitly

Address Copilot review: include <cstdio> for std::setvbuf portability,
use std::endl instead of "\n" to guarantee flush on piped stdout.
This commit is contained in:
tokenflow1m
2026-03-15 18:25:48 +09:00
parent 8844111584
commit afab911732
+2 -1
View File
@@ -1,4 +1,5 @@
#include <windows.h>
#include <cstdio>
#include <iostream>
#include <string>
#include <thread>
@@ -48,7 +49,7 @@ int main() {
if (type != lastType) {
lastType = type;
std::cout << "STATE:" << type << "\n";
std::cout << "STATE:" << type << std::endl;
}
}