摘要:
#include <stdio.h>main(){FILE *fp;char ch, st[2000]; if((fp=fopen("c:/log.log","at++")) == NULL) { printf("Cannot open file strike any keys exit!"); getch(); exit(1); } printf("Input a string:\n"); //gets(st); scanf("%[^\n]", st); fputs(st, fp) 阅读全文
摘要:
#include "string.h"#include <vector>void CAutoZipDlg::OnBnClickedOk() { using namespace std; vector<CString> strVec; CString teststr = GetCommandLine(); //retrives the command-line string for the current process. CString outputstr; int flag = 0; for(int i = 0;i < teststr.Get 阅读全文
摘要:
//writeby: lhsbqb//date:2012-10-17//title:VC++语言如何输出当前日期,如何获取当前日期#include "time.h"#include "iostream.h"#include "windows.h"int main(int argc, char* argv[]){ time_t nowTime; while(true) { time(&nowTime); struct tm *sysTime = localtime(&nowTime); system("titl 阅读全文