專注電子技術(shù)學(xué)習(xí)與研究
當(dāng)前位置:單片機教程網(wǎng) >> MCU設(shè)計實例 >> 瀏覽文章

C++ main函數(shù)參數(shù)例子

作者:佚名   來源:本站原創(chuàng)   點擊數(shù):  更新時間:2013年10月31日   【字體:
//main帶參數(shù)代碼示例
#include <iostream.h>
int main(int argc,char *argv[])
{
cout<<"輸入?yún)?shù)一  "<<argv[1]<<endl;
cout<<"輸入?yún)?shù)二  "<<argv[2]<<endl;
        cout<<"文件名為第一個參數(shù)"<<argv[0]<<endl;
}


 

 
關(guān)閉窗口

相關(guān)文章