随笔分类 -  C/C++

摘要:今天因为需要帮一个同事的新闻内容录入为html, 每次手改不方便,所以就弄了个csv(excel)转json的c++程序,然后再利用ejs把它渲染成网页,打开渲染好的网页再保存(不能保存源文件,不然还是空的),就可以把内容弄成一个html了,此作mark,以下为程序// convert.cpp#include #include #include using namespace std;int main() { freopen("in.csv", "r", stdin); freopen("json.js", "w" 阅读全文
posted @ 2014-04-11 10:01 yedeying 阅读(2204) 评论(0) 推荐(0)
摘要:因为本人的某些小强迫症,写了一个格式化并根据js函数名排序的c++程序,此作mark#include #include #include #include using namespace std;int main() { freopen("in.js", "r", stdin); freopen("out.js", "w", stdout); string str, name, content; map mp; char ch; while((ch = getchar()) != EOF) { str += ch; 阅读全文
posted @ 2014-04-08 12:19 yedeying 阅读(458) 评论(0) 推荐(0)