#include #include #include int main(int argc, char *argv[]){ int opt; for(opt = 0 ; opt < argc ; opt++) printf("argv[%d] = %s\n" , opt, argv[opt]); .....
分类:
其他好文 时间:
2015-02-04 18:19:22
阅读次数:
146
#include #include #include //这个非常重要,不然玩不转#include int main(int argc, char *argv[]){ MYSQL my_connection; MYSQL_RES *result; MYSQL_ROW sql_row; int ...
分类:
数据库 时间:
2015-02-04 10:50:07
阅读次数:
172
/**
*NSDate和NSDateComponents
*/
/**
*创建标识今天的日期
*方法:NSDate中的date方法创建表示当前日期的对象
*/
NSDate *todaysDate=[NSDate date];
/**
*获取今天的日期列子
*/
#import
int main(int argc,const char *argv[...
分类:
其他好文 时间:
2015-02-03 19:26:44
阅读次数:
129
最近实现一个windows server端守护进程启动服务功能(c++实现),遇到了一些问题,记录一下1. 启动Service实现代码: 1 int _tmain(int argc, TCHAR* argv[]) 2 { 3 SERVICE_TABLE_ENTRYW dispatch_tab...
分类:
编程语言 时间:
2015-02-03 11:00:53
阅读次数:
160
使用编译器vs2008。第一、第二个參数的使用方法:样例:使用ie打开指定的网页。注意第二个參数是 可运行文件+命令行參数#include "stdafx.h"#include #include int main(int argc, char* argv[]) { STARTUPINFO si...
分类:
其他好文 时间:
2015-02-03 10:48:50
阅读次数:
124
1、查找资料却没找到能够通过odbc访问07版以上的Excel2、代码#include "widget.h"#include #include #include #include int main(int argc, char *argv[]){ QApplication a(argc, ar...
分类:
数据库 时间:
2015-02-02 19:37:16
阅读次数:
399
1、文件->新建项目->qt widgets application->qwidget->完成2、在.pro文件中增加QT +=sql3、代码#include "widget.h"#include #include #include #include int main(int argc, char ...
分类:
数据库 时间:
2015-02-02 19:31:35
阅读次数:
187
1 #include "unp.h" 2 3 int 4 main(int argc, char **argv) 5 { 6 union { 7 short s; 8 char c[sizeof(short)]; 9 } un;10 11 ...
分类:
其他好文 时间:
2015-01-31 14:29:45
阅读次数:
245
对于默认构造函数,知道应该这么用:classType objectName;
估计你知道不能classType objectName();因为这是函数声明而不是类对象定义,很多资料都已提及。
但是稍微变化一下,就未必一下子反应过来了,看下面这个例子:
struct IntTest
{
int ival;
};
int _tmain(int argc, _TCHAR* argv[])
...
分类:
其他好文 时间:
2015-01-31 10:42:52
阅读次数:
181
问题:编写一个主函数main,使用两个值作为实参,并输出它们的和。代码:#include #include using namespace std;//计算两个数的和int main(int argc, char **argv){ string strName = argv[0]; int ...
分类:
编程语言 时间:
2015-01-30 22:15:17
阅读次数:
220