菜菜

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页

2018年1月27日

摘要: #include using namespace std; class Circle { double radius; public: Circle(double r) { radius = r; } double area() { return 2 * radius; } }; class Cylind... 阅读全文
posted @ 2018-01-27 17:44 好吧,就是菜菜 阅读(244) 评论(0) 推荐(0)

2018年1月14日

摘要: 若当前搜索到的城市n前面1~n-1编号的城市中有没有通电的,则永远也无法输送电力给那个城市,因为在剪枝时附加了和此结点连接的最大结点小于当前的结点 这段 for(int i = 1; i < cur; i++) if(!vis[i] && map[i][0] < cur) return; 阅读全文
posted @ 2018-01-14 22:37 好吧,就是菜菜 阅读(137) 评论(0) 推荐(0)

2018年1月12日

摘要: [Unit] Description=auto run zk server After=network.target [Service] Type=simple Environment=ZHOME=/usr/local/zookeeper-3.4.11 #ExecStart=/usr/local/zookeeper-3.4.11/bin/zkServer.sh start #ExecStop=... 阅读全文
posted @ 2018-01-12 11:09 好吧,就是菜菜 阅读(180) 评论(0) 推荐(0)

2018年1月1日

摘要: #include #include #include using namespace std; /** * url:http://www.cplusplus.com/doc/tutorial/other_data_types/ */ /** * in which all its member elements occupy the same physical space in memor... 阅读全文
posted @ 2018-01-01 01:27 好吧,就是菜菜 阅读(206) 评论(0) 推荐(0)

摘要: #include #include using namespace std; int main() { /** * 动态内存 * url: http://www.cplusplus.com/doc/tutorial/dynamic/ * 关键字new用于在程序运行时动态开辟内存,内存开辟在堆空间. * 此关键字不保证内存一定开辟成功,如果开辟... 阅读全文
posted @ 2018-01-01 00:38 好吧,就是菜菜 阅读(165) 评论(0) 推荐(0)

2017年12月31日

摘要: ++的操作高于* 阅读全文
posted @ 2017-12-31 01:01 好吧,就是菜菜 阅读(210) 评论(0) 推荐(0)

2017年12月10日

摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; /** * 命名空间 * *namespace identifier *{ * named_entities *} */ nam... 阅读全文
posted @ 2017-12-10 17:25 好吧,就是菜菜 阅读(219) 评论(0) 推荐(0)

摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; /** * 重载,函数有不同数目的参数或者是不同类型的参数 */ int operate(int a, int b) { return (... 阅读全文
posted @ 2017-12-10 16:58 好吧,就是菜菜 阅读(262) 评论(0) 推荐(0)

摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; /** * Calling a function with parameters taken by value causes copies o... 阅读全文
posted @ 2017-12-10 13:03 好吧,就是菜菜 阅读(858) 评论(0) 推荐(0)

摘要: 来自官方文档。。。感谢老王指出需要c++11,一下代码全在c++11下编译,编译参数加入 -std=c++11 阅读全文
posted @ 2017-12-10 00:44 好吧,就是菜菜 阅读(5674) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页