Welcome![Sign In][Sign Up]
Location:
Search - argc argv

Search list

[Othermainsvariables

Description: 可以加深对main()argc,argv,env的理解-can deepen the main () argc, argv, env understanding
Platform: | Size: 982 | Author: ab418001 | Hits:

[File OperateXXXX

Description: C语言编程宝点之XXXX main()主函数 每一C 程序都必须有一main()函数, 可以根据自己的爱好把它放在程序的某 个地方。有些程序员把它放在最前面, 而另一些程序员把它放在最后面, 无论放 在哪个地方, 以下几点说明都是适合的。 1. main() 参数 在Turbo C2.0启动过程中, 传递main()函数三个参数: argc, argv和env。 * argc: 整数, 为传给main()的命令行参数个数。 * argv: 字符串数组。 在DOS 3.X 版本中, argv[0] 为程序运行的全路径名 对DOS 3.0 以下的版本, argv[0]为空串(\"\") 。 argv[1] 为在DOS命令行中执行程序名后的第一个字符串 argv[2] 为执行程序名后的第二个字符串 ... argv[argc]为NULL。 *env: 安符串数组。env[] 的每一个元素都包含ENVVAR=value形式的字符 串。其中ENVVAR为环境变量如PATH或87。value 为ENVVAR的对应值如C:\\DOS, C: \\TURBOC(对于PATH) 或YES(对于87)。 Turbo C2.0启动时总是把这三个参数传递给main()函数, 可以在用户程序中 说明(或不说明)它们, 如果说明了部分(或全部)参数, 它们就成为main()子程序 的局部变量。
Platform: | Size: 8817 | Author: jianjian | Hits:

[GUI DevelopPanGraphRun

Description: #include <QtGui/QApplication> #include <QtCore/QTextCodec> #include \"PanGraphRun.h\" int main(int argc, char *argv[]) { QApplication a(argc, argv) QTextCodec::setCodecForTr(QTextCodec::codecForName(\"GBK\")) PanGraphRun w if(argc > 1) { w.loadFile(QObject::tr(argv[1])) } w.showMaximized() a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())) return a.exec() }
Platform: | Size: 15168 | Author: ljh | Hits:

[Program docQT中文版

Description:

嘒彼小星的笔记

http://blog.csdn.net/iamdbl/

 

 

1.1Hello Qt开始  

 

差不多所有的程序教材都从Hello 开始,下面就是这个程序的qt版本。

1 #include <QApplication>
2 #include <QLabel>
3 int main(int argc, char *argv[])
4 {
5     QApplication app(argc, argv);
6     QLabel *label = new QLabel("Hello Qt!");
7     label->show();
8     return app.exec();
9 }

 


Platform: | Size: 1396219 | Author: liruixin0202 | Hits:

[Othermainsvariables

Description: 可以加深对main()argc,argv,env的理解-can deepen the main () argc, argv, env understanding
Platform: | Size: 1024 | Author: | Hits:

[File OperateXXXX

Description: C语言编程宝点之XXXX main()主函数 每一C 程序都必须有一main()函数, 可以根据自己的爱好把它放在程序的某 个地方。有些程序员把它放在最前面, 而另一些程序员把它放在最后面, 无论放 在哪个地方, 以下几点说明都是适合的。 1. main() 参数 在Turbo C2.0启动过程中, 传递main()函数三个参数: argc, argv和env。 * argc: 整数, 为传给main()的命令行参数个数。 * argv: 字符串数组。 在DOS 3.X 版本中, argv[0] 为程序运行的全路径名 对DOS 3.0 以下的版本, argv[0]为空串("") 。 argv[1] 为在DOS命令行中执行程序名后的第一个字符串 argv[2] 为执行程序名后的第二个字符串 ... argv[argc]为NULL。 *env: 安符串数组。env[] 的每一个元素都包含ENVVAR=value形式的字符 串。其中ENVVAR为环境变量如PATH或87。value 为ENVVAR的对应值如C:\DOS, C: \TURBOC(对于PATH) 或YES(对于87)。 Turbo C2.0启动时总是把这三个参数传递给main()函数, 可以在用户程序中 说明(或不说明)它们, 如果说明了部分(或全部)参数, 它们就成为main()子程序 的局部变量。-err
Platform: | Size: 8192 | Author: jianjian | Hits:

[GUI DevelopPanGraphRun

Description: #include <QtGui/QApplication> #include <QtCore/QTextCodec> #include "PanGraphRun.h" int main(int argc, char *argv[]) { QApplication a(argc, argv) QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK")) PanGraphRun w if(argc > 1) { w.loadFile(QObject::tr(argv[1])) } w.showMaximized() a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())) return a.exec() }-#include <QtGui/QApplication> #include <QtCore/QTextCodec> #include "PanGraphRun.h" int main(int argc, char*argv[]) { QApplication a(argc, argv) QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK")) PanGraphRun w if(argc > 1) { w.loadFile(QObject::tr(argv[1])) } w.showMaximized() a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())) return a.exec() }
Platform: | Size: 15360 | Author: ljh | Hits:

[Linux-Unixhelloword

Description: /* GtkWidget 是构件的存储类型 */ GtkWidget *window GtkWidget *button /* 这个函数在所有的 GTK 程序都要调用。参数由命令行中解析出来并且送到该程序中*/ gtk_init (&argc, &argv) /* 创建一个新窗口 */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL) -/* GtkWidget is the storage component type*/GtkWidget* window GtkWidget* button/* this function in all the procedures to be called GTK. Parameters from the command line to resolve them and to the process*/gtk_init (
Platform: | Size: 11264 | Author: zhoujay | Hits:

[Button controlbutton

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "ArrowButton", NULL, 0, &argc, argv, NULL, NULL] //建立多选按钮的布局组件 n = 0 XtSetArg[args[n], XmNarrowDirection, XmARROW_RIGHT] n++ XtSetArg[args[n], XmNwidth, 100] n++ XtSetArg[args[n], XmNheight, 100] n++ arrow = XmCreateArrowButton[toplevel, "arrow", args, n] XtManageChild[arrow]
Platform: | Size: 8192 | Author: zzroot | Hits:

[Linux-Unixdrawarea

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "DrawArea", NULL, 0, &argc, argv, NULL, NULL] //建立drawarea n = 0 XtSetArg[args[n], XmNwidth, 500 ] n++ XtSetArg[args[n], XmNheight, 500 ] n++ drawarea = XmCreateDrawingArea[toplevel, "drawarea", args, n] XtManageChild[drawarea] //建立绘图所用的GC prepare[] -//建立顶级窗口 toplevel = XtVaAppInitialize[&app, "DrawArea", NULL, 0, &argc, argv, NULL, NULL] //建立drawarea n = 0 XtSetArg[args[n], XmNwidth, 500 ] n++ XtSetArg[args[n], XmNheight, 500 ] n++ drawarea = XmCreateDrawingArea[toplevel, "drawarea", args, n] XtManageChild[drawarea] //建立绘图所用的GC prepare[]
Platform: | Size: 1024 | Author: zzroot | Hits:

[Linux-Unixform

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Form", NULL, 0, &argc, argv, NULL, NULL] n = 0 XtSetArg[args[n], XmNwidth, 500] n++ XtSetArg[args[n], XmNheight, 500] n++ XtSetValues[toplevel, args, n] //建立主窗口 form = XmCreateForm[toplevel, "form", NULL, 0] XtManageChild[form] //建立菜单条 n = 0 XtSetArg[args[n], XmNtopAttachment, XmATTACH_FORM] n++ XtSetArg[args[n], XmNleftAttachment, XmATTACH_FORM] n++ XtSetArg[args[n], XmNrightAttachment, XmATTACH_FORM] n++ menubar = XmCreateMenuBar[form, "menubar", args, n] XtManageChild[menubar] create_menu[menubar]
Platform: | Size: 4096 | Author: zzroot | Hits:

[Linux-Unixframe

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Frame", NULL, 0, &argc, argv, NULL, NULL] //建立Frame组件 n = 0 XtSetArg[args[n], XmNshadowType, XmSHADOW_ETCHED_IN] n++ XtSetArg[args[n], XmNshadowThickness, 4] n++ frame = XmCreateFrame[toplevel, "frame", args, n] XtManageChild[frame]
Platform: | Size: 1024 | Author: xiaoran | Hits:

[Linux-Unixlabel

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Label", NULL, 0, &argc, argv, NULL, NULL] //建立按钮上标签的字符串 str = XmStringCreateLtoR["A Simple\n Label", XmFONTLIST_DEFAULT_TAG] n = 0 XtSetArg[args[n], XmNlabelString, str] n++ label = XmCreateLabel[toplevel, "pushbutton", args, n] XtManageChild[label] XmStringFree[str] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app] -//Set up top-level window toplevel = XtVaAppInitialize [
Platform: | Size: 12288 | Author: xiaoran | Hits:

[Linux-Unixlist

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "List", NULL, 0, &argc, argv, NULL, NULL] //建立列表上的复合字符串 for[i=0 i<12 i++] str_months[i] = XmStringCreateSimple[months[i]] //建立列表 n = 0 XtSetArg[args[n], XmNitems, str_months] n++ XtSetArg[args[n], XmNitemCount, 12] n++ XtSetArg[args[n], XmNvisibleItemCount, 8] n++ //XtSetArg[args[n], XmNscrollBarDisplayPolicy, XmSTATIC] n++ //XtSetArg[args[n], XmNlistSizePolicy, XmCONSTANT] n++ XtSetArg[args[n], XmNselectionPolicy, XmEXTENDED_SELECT] n++ list = XmCreateScrolledList[toplevel, "list", args, n] XtManageChild[list] for[i=0 i<12 i++] XmStringFree[str_months[i]] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app] -//建立顶级窗口 toplevel = XtVaAppInitialize[&app, "List", NULL, 0, &argc, argv, NULL, NULL] //建立列表上的复合字符串 for[i=0 i<12 i++] str_months[i] = XmStringCreateSimple[months[i]] //建立列表 n = 0 XtSetArg[args[n], XmNitems, str_months] n++ XtSetArg[args[n], XmNitemCount, 12] n++ XtSetArg[args[n], XmNvisibleItemCount, 8] n++ //XtSetArg[args[n], XmNscrollBarDisplayPolicy, XmSTATIC] n++ //XtSetArg[args[n], XmNlistSizePolicy, XmCONSTANT] n++ XtSetArg[args[n], XmNselectionPolicy, XmEXTENDED_SELECT] n++ list = XmCreateScrolledList[toplevel, "list", args, n] XtManageChild[list] for[i=0 i<12 i++] XmStringFree[str_months[i]] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app]
Platform: | Size: 3072 | Author: xiaoran | Hits:

[Linux-Unixspinbox

Description: setlocale[LC_ALL, ""] XtSetLanguageProc[NULL, NULL, NULL] //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "SpinBox", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL] -setlocale[LC_ALL, ""] XtSetLanguageProc[NULL, NULL, NULL] //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "SpinBox", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL]
Platform: | Size: 2048 | Author: xiaoran1 | Hits:

[Linux-Unixhelloworldmotif-1

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Scroll", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL] - //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Scroll", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL]
Platform: | Size: 1024 | Author: xiaoran1 | Hits:

[source in ebookargc

Description: 测试了解main函数的两个默认输入参数 argc argv-Understand the main function to test the two default input parameters argc argv
Platform: | Size: 182272 | Author: echo | Hits:

[Chess Poker gamesQTchees

Description: QT象棋源码 #include <qapplication.h> #include "main_form.h" int main( int argc, char ** argv ) { QApplication a( argc, argv ) MainForm w w.initializeAll() w.show() a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ) return a.exec() } -QT chess source
Platform: | Size: 63488 | Author: | Hits:

[Linux-Unixqtstudydoc

Description: QT学习教程,很好用的 差不多所有的程序教材都从Hello 开始,下面就是这个程序的qt版本-good QT course 1#include <QApplication> 2#include <QLabel> 3 int main(int argc, char*argv[]) 4 { 5 QApplication app(argc, argv) 6 QLabel*label = new QLabel("Hello Qt!") 7 label->show() 8 return app.exec() 9 }
Platform: | Size: 1451008 | Author: rosex | Hits:

[VC/MFCargc-argv

Description: 简单扼要的对argc argv函数的功能进行描述,对初级学院有指导作用-Brief argc argv function description, junior college guidance
Platform: | Size: 4096 | Author: 王菂 | Hits:
« 12 3 4 »

CodeBus www.codebus.net