c++
小喜庆的瓶子
这个作者很懒,什么都没留下…
展开
-
c++源代码:拷贝文件
#include #include using namespace std;int main(int argc,char * argv[]){ char ch; ofstream fout(argv[2]); ifstream fin(argv[1]); while(fin) { ch=fin.get(); fout << ch; }}原创 2014-05-02 20:33:27 · 574 阅读 · 0 评论 -
c++源代码:时钟(获取系统当前时间)
#include #include using namespace std;class Time{ int hour; int min; int sec;public: Time() { time_t tt=time(NULL); tm *t=localtime(&tt); hour=t原创 2014-05-02 20:20:41 · 1428 阅读 · 0 评论 -
c++源代码:输出文件内容显示行数
#include #include #include using namespace std;int main(int argc,char * argv []){ string str; int n=0; ifstream fin(argv[1]); while(fin) { getline(fin,str); cout << str << endl; n++;原创 2014-05-02 20:26:26 · 1241 阅读 · 0 评论 -
c++源代码:倒计时(输入时 分 妙)
#include using namespace std;class Time{ int hour; int min; int sec;public: Time(int a,int b,int c) { hour=a; min=b; sec=c; } void show() {原创 2014-05-02 20:18:23 · 4676 阅读 · 0 评论