Commit 65d27a21 authored by fasiondog's avatar fasiondog
Browse files

trans demo.cpp file to utf-8 code

parent 38de8a7f
Showing with 11 additions and 2 deletions
+11 -2
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
.cproject .cproject
.project .project
.pyproject .pyproject
.vscode
/build /build
*~ *~
// demo.cpp : 定义控制台应用程序的入口点。 // demo.cpp : 定义控制台应用程序的入口点。
// //
#include <hikyuu/hikyuu.h> #include <hikyuu/hikyuu.h>
...@@ -7,13 +7,20 @@ using namespace hku; ...@@ -7,13 +7,20 @@ using namespace hku;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
//配置文件的位置自行修改 //配置文件的位置自行修改
hikyuu_init("c:\\stock\\hikyuu_win.ini"); hikyuu_init("c:\\stock\\hikyuu_win.ini");
StockManager& sm = StockManager::instance(); StockManager& sm = StockManager::instance();
Stock stk = sm.getStock("sh000001"); Stock stk = sm.getStock("sh000001");
std::cout << stk << std::endl; std::cout << stk << std::endl;
auto k = stk.getKData(KQuery(-10));
std::cout << k << std::endl;
for (auto i=0; i < k.size(); i++) {
std::cout << k[i] << std::endl;
}
return 0; return 0;
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#ifndef HIKYUU_H_ #ifndef HIKYUU_H_
#define HIKYUU_H_ #define HIKYUU_H_
#include "KData.h"
#include "StockManager.h" #include "StockManager.h"
#include "utilities/util.h" #include "utilities/util.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment