摘要: 文件流:以文件为输入输出对象的流 #include<fstream> 一、文件操作打开一个输入或输出文件 1.打开一个输出文件 ofstream fout; fout.open("1.txt"); 2.打开一个输入文件 ifstream fin; fin.open("2.txt"); 3.打开一个文 阅读全文
posted @ 2016-06-14 23:06 ranran1203 阅读(340) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solut 阅读全文
posted @ 2016-06-14 17:26 ranran1203 阅读(243) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solut 阅读全文
posted @ 2016-06-14 15:38 ranran1203 阅读(188) 评论(0) 推荐(0)
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. /** * Definition for a point. * struct Point { * i 阅读全文
posted @ 2016-06-14 14:45 ranran1203 阅读(270) 评论(0) 推荐(0)