
C++
jxust_tj
这个作者很懒,什么都没留下…
展开
-
C++调python
我大致知道两种方法:1. 利用PyRun_SimpleString 这个方法优点是使用还算方便,缺点是需要用到本地python解释器,而且在c++里面写python的语法检查地非常严格,很容易出错。貌似可以将python解释器嵌到c++的项目里去,但我在网上找了许久,有一两个好像成功了,但很麻烦,因为工作环境不一样,所以我放弃尝试了。。 2. 把python打包成exe ...原创 2017-11-15 21:24:47 · 480 阅读 · 0 评论 -
c++读文件(一次全读/每行读/多次读)
我以为这些都很容易在网上找到,谁知网上乱七八糟的东西太多,让我找了很久。。一次全读:std::ifstream t(path);std::stringstream buffer;buffer << t.rdbuf();std::string s = buffer.str();std::cout 每行读/多次读:std::ifstream fin(path);while (原创 2017-11-15 15:13:35 · 13508 阅读 · 2 评论 -
c++获取Windows“我的文档”路径
For old systems, there's SHGetSpecialFolderPath. For somewhat newer systems, there's SHGetFolderPath转载 2017-12-19 12:55:58 · 4801 阅读 · 0 评论