From 3008b2dfbe270a6f2e4609e52e4b4343f0ca6e58 Mon Sep 17 00:00:00 2001 From: fasiondog Date: Wed, 28 Aug 2024 01:53:53 +0800 Subject: [PATCH] update --- hikyuu_cpp/demo/demo3.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hikyuu_cpp/demo/demo3.cpp b/hikyuu_cpp/demo/demo3.cpp index 9f5b3327..dd270185 100644 --- a/hikyuu_cpp/demo/demo3.cpp +++ b/hikyuu_cpp/demo/demo3.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #if defined(_WIN32) #include @@ -38,7 +39,7 @@ int main(int argc, char* argv[]) { try { // 配置文件的位置自行修改 - hikyuu_init("C:\\Users\\admin\\.hikyuu\\hikyuu.ini"); + hikyuu_init(fmt::format("{}/.hikyuu/hikyuu.ini", getUserDir())); // 启动行情接收(只是计算回测可以不需要) startSpotAgent(true); @@ -61,6 +62,7 @@ int main(int argc, char* argv[]) { json data; const auto& jcodes = req["codes"]; + // HKU_INFO("codes size: {}", jcodes.size()); for (auto iter = jcodes.cbegin(); iter != jcodes.cend(); ++iter) { string market_code = to_string(*iter); market_code = market_code.substr(1, market_code.size() - 2);