C++ 执行应用程序

【C++学习笔记】Visual Studio创建C++项目 文件-新建-项目 选择新建项目类型、名称 (1)控制台应用程序:是写CUI程序的,也就是该程序运行时系统会自动调用system32下的某个exe给它创建一个字符界面的窗口(一般是黑底灰白字)。通常被设计为没有图形用户界面即DOS界面,并编译成独立的可执行文件。(即控制台输入) (2)空项目:空项目是自己搭建应用程序框架,而非空项目VS会自动从模板中给你创建一个应用程序框架 源文件-添加-新建项 (1).cpp文件是C++语言的源文件,用来写程序实现代码 编写代码 (1)开始. 阅读详情

void ShellExe()
{
 shellexecuteinfo shexecinfo = {0};
 shexecinfo.cbsize = sizeof(shellexecuteinfo);
 shexecinfo.fmask = see_mask_nocloseprocess;
 shexecinfo.hwnd = null;
 shexecinfo.lpverb = null;
 shexecinfo.lpfile = "c:timer.exe ";
 shexecinfo.lpparameters = " "; 
 shexecinfo.lpdirectory = null;
 shexecinfo.nshow = sw_show;
 shexecinfo.hinstapp = null; 
 shellexecuteex(&shexecinfo);
 sleep(3000); //延时3秒后关闭刚才打开的程序
 terminateprocess(shexecinfo.hprocess,infinite);

}

 

ShellExecute()
函数原型:   
            HINSTANCE   ShellExecute(   HWND   hwnd,   LPCTSTR   lpOperation,   LPCTSTR   lpFile,    
            LPCTSTR   lpParameters,   LPCTSTR   lpDirectory,   INT   nShowCmd   );
参数说明:

hwnd   窗口的句柄  
lpOperation   进行的操作,如 "open ", "print ", "explore "分别对应 "打开 ", "打印 ", "游览 ",   也可以为空( " "),此时表示进行默认的操作。   lpFile   要操作的文件。  
lpParameters   如果lpFile指定的是一个可执行文件则表示参数  
lpDirectory   操作进行的目录  
nShowCmd   程序的运行方式,其取值见上例。    

如果这个函数调用成功,将返回实例的句柄,如果不成功,返回值包含错误信息,由于类型比较多,这里就不一一列举了,详见WinApi的帮助。

这样,上面的例子就可以改变为(假设窗口的句柄为Handle)

ShellExecute(NULL, "open ", "notepad ", "c:\\tst.txt ", " ",SW_SHOWNORMAL);

其实不用那么复杂,因为.TXT的关联程序就是记事本,所以只要这样就可以了

ShellExecute(NULL, " ", "c:\\tst.txt ", " ", " ",SW_SHOWNORMAL);

这个函数和WIN9X中的命令行命令 "start "类似,不光可以对文件进行操作,还可以对HTTP、MAILTO等进行操作。这样我们就可以设计有超级链接风格的程序了。

然后放置两个Label,设置其属性为:

Name   lbHomepage   lbEMail  
Caption   http://mail.126.com   mailto:xxxx@126.com  

并把字体改为蓝色有下划线,然后分别在两个Label的Click事件中加入以下代码:

ShellExecute(Me.hWnd, " ",lbHomepage.Caption, " ", " ",SW_SHOWNORMAL);

ShellExecute(Me.hWnd, " ",lbEMail.Caption, " ", " ",SW_SHOWNORMAL);

OK!试试看,如何?够酷的吧!

从上面可看出,ShellExecute的功能要强得多,并且可以完全替代WinExec(),事实上,WinExec()也是为了和以前版本兼容而保留,所以,我们要尽量使用ShellExecute()。其实在WinAPI

中,还有一个函数ShellExecuteEx()   ,但其使用复杂,又不支持Windows   NT。

 

C++ 调用外界应用程序exe的方法 1.ShellExecute函数   function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,Directory: PChar; ShowCmd: Integer): HINST; stdcall; ●hWnd:用于指定父窗口句柄。当函数调用过程出现错误时,它将作为Windows消息窗口的父窗口。例如,可以将其设置为应用... 阅读详情

相关推荐

【并发编程二十二】通过进程名字杀死进程TerminateProcess

并发编程系列,我们只加写了如何启动一个子进程,这个子进程可以自己退出,但是并没有讲解如何通过进程名字强杀进程,这里我们讲解下。并讲解下可能遇到的三个问题。

junxuezheng的博客 1230

C++ 强制关闭进程 Force Terminate Process

强制关闭进程方法 执行Windows CMD指令:system(""); system("taskkill /f /t /im appName.exe"); 使用TerminateProcess()结束进程(推荐使用) HANDLE hself = GetCurrentProcess(); TerminateProcess(hself, 0);

fwsylin的博客 4827

C++通过TerminateProess结束进程实例

主要介绍了C++通过TerminateProess结束进程实例,是Windows应用程序设计中非常实用的技巧,需要的朋友可以参考下

C/C++线程退出的四种方法

想要终止线程的运行,可以使用以下方法: 线程函数返回(最好使用该方法)。 同一个进程或另一个进程中的线程调用TerminateThread函数(应避免使用该方法)。 通过调用ExitThread函数,线程将自行撤消(最好不使用该方法)。 ExitProcess和TerminateProcess函数也可以用来终止线程的运行(应避免使用该方法)。 下面将详细介绍终止线程运行的方法:1-4,并说明线...

Keep Moving~ 5万+

【Azure 架构师学习笔记】- Azure Private Endpoint

公有云的其中一个特点是默认允许公网访问, 这就对企业环境带来风险,也是很多年前企业对公有云抵触的其中一个原因,现在这类问题已经很少,因为有了很多技术来确保云上的资源被安全地访问。其中Private endpoint(PE)就起到了很重要的作用。云上的某个资源如VM会创建在特定的网络(VNet/Subnet)上, 而其他如Storage Account , Azure SQL等PaaS服务则没有。如果你需要用VM 来访问这些PaaS资源,VM 就会通过资源的公网IP 来访问。

MVP黄钊吉(發糞塗牆) 1788

E4A蓝牙APP开发实战:从零到一构建简易物联网控制终端

本文详细介绍了使用E4A(易安卓)开发蓝牙APP的实战教程,从零开始构建简易物联网控制终端。通过E4A的中文编程环境和内置蓝牙组件,开发者可以快速实现智能家居控制、创客项目遥控等功能。文章涵盖硬件准备、开发环境搭建、核心代码解析及典型应用场景,特别适合零Java基础的电子爱好者入门蓝牙APP开发。

weixin_42715608的博客 474

c/c++ 结束进程的方法

1.使用ExitProcess()结束进程      进程只是提供了一段地址空间和内核对象,其运行时通过在其地址空间内的主线程来体现的。当主线程的进入点函数返回时,进程也就随之结束。这种进程的终止方式是进程的正常退出,进程中的所有线程资源都能够得到正确的清除。除了这种进程的正常

低调走过 2万+

AD9361数字调制入门:从IQ调制原理到动手实现第一个ASK信号(Vivado工程详解)

本文详细介绍了如何使用AD9361射频收发器实现ASK数字调制,从IQ调制原理到Vivado工程实现。通过Verilog代码示例和FPGA架构设计,帮助开发者理解纯逻辑实现数字调制解调的关键技术,特别适合软件无线电(SDR)初学者入门实践。

weixin_29158047的博客 374

PHP中通过Web 执行C/C++应用程序

PHP中通过Web 执行C/C++应用程序 一、简介     如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++的编译器,分别是GCC和G++。Unix在程序安装及Make等许 多地方使用到了这些编译器。利用一些控制台命令,C++和PHP, 我将向你介绍怎样生成一个完整的C++程序例子,他可以在用PHP程序来执行,并能获得相应的输出结果。我将...

weixin_34242331的博客 100

告别倍福开发板:手把手教你用SSC工具为STM32生成EtherCAT从站代码

本文详细介绍了如何使用SSC工具为STM32生成EtherCAT从站代码,帮助开发者在不依赖倍福开发板的情况下实现高效的工业以太网通信。通过SSC工具的配置、XML文件设计、代码移植与硬件适配等步骤,开发者可以轻松构建自定义的EtherCAT通信系统,提升工业自动化项目的灵活性和效率。

weixin_33925615的博客 410

23 RAG 为什么答不准:召回、分块、排序的常见坑

RAG 答不准时,不要先怪模型。本文把常见失败拆成召回不到、召回不准、分块不完整、排序靠后、上下文污染和生成不忠实六类,并给出从 Top-K 检查到评估集的排查流程。

老于的笔记的专栏 246

PHP中如何通过Web执行C/C++应用程序?

一、简介     如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++的编译器,分别是GCC和G++。Unix在程序安装及Make等许多地方使用到了这些编译器。利用一些控制台命令,C++和PHP, 我将向你介绍怎样生成一个完整的C++程序例子,他可以在用PHP程序来执行,并能获得相应的输出结果。我将先生成C++程序代码,并编译它,谈后讨论我们将如果通过使用PHP的函数

birthmarkqiqi的专栏 419

Qwen-Image(阿里通义千问)技术浅析(一)

Qwen-Image(阿里通义千问多模态模型)是阿里巴巴推出的视觉-语言多模态大模型,能够理解图像内容并完成复杂的跨模态任务。

m0_75253143的博客 678

php运行c,PHP中通过Web 执行C/C++应用程序

您可能感兴趣的话题:PHP核心提示:如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++的编译器,分别是GCC和G++。一、简介如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++的编译器,分别是GCC和G++。Unix在程序安装及Make等许多地方使用到了这些编译器。利用一些控制台命令,C++和PHP, 我将向你介绍怎样生成一个完整的C++程序例子...

weixin_36334284的博客 242

小秋SLAM入门实战ubuntu所有文章汇总

ubuntu 终端如何停止快速打印的输出以及恢复命令 ubuntu 终端如何快速打开当前路径下的图形化窗口界面? killall -9用途用法 ps -xu | grep这个命令的用途 linux 下 top命令显示的是内存是堆内存吗? zip分割和合并 关闭除当前 GNOME 终端窗口以外的所有其他 GNOME 终端窗口 如何在安装系统后设置短密码 【如何使用getrusage获取消耗的CPU时间和进程使用的最大物理内存】 【webots安装使用教程】 Linux系统下查看当前运行的进程和线程的几种方法

小秋 AI SLAM 入门实战教程 1404

YOLOv5入门实践(2)——手把手教你利用labelimg标注数据集

YOLOv5入门实践第2步,手把手教你使用labelimg标注数据集

路人贾的博客 1万+

实战经验 PHP中通过Web执行C/C++应用程序

一、简介    如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++的编译器,分别是GCC和G++。Unix在程序安装及Make等许多地方使用到了这些编译器。利用一些控制台命令,C++和PHP, 我将向你介绍怎样生成一个完整的C++程序例子,他可以在用PHP程序来执行,并能获得相应的输出结果。我将先生成C++程序代码,并编译它,谈后讨论我们将如果通过使用PHP的函数pass

自由鱼√ 927

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

C++Builder 新建过程

File---New…---Console Wizard 选择 C++,勾选Console Application(控制台应用程序)。 View中(视图),可以打开项目管理器Project Manager 写入自己的功能代码: 新增*.cpp文件和*.h文件: File---New…---Cpp File/Header File 编译程序,生成 *.exe 可执行文件。 该工程目录下所有文件如下图所示:

菜鸟打怪的博客 1132

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

VS code 配置C/C++环境(配置intellisense)

点击左边扩展栏图标—>搜索C/C++ -> 安装->Reload:安装完成之后,打开你的包含c++的文件夹,将会生成一个.vscode文件夹,所有的配置将在这个文件夹中进行配置。

m0_74795952的博客 1万+

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Android应用程序中用Java创建本地进程来执行C/C++程序

<br /><br />大致分为五步:创建环境、建立连接、发送数据、读取结果、释放资源。<br />下面我们以打开一个shell进程,在进程中执行pwd命令,然后退出为例,来看一下整个过程。<br /> <br />1、创建环境<br />主要有两个:执行程序和当前目录。这个和在命令行下执行一个普通的Linux程序一样,先有一个当前目录,然后在当前目录下面调用要执行的程序。我们运行pwd的话,就需要在一个目录下启动shell进程。当前目录我们可以随便选一个。这里选根目录。<br />ProcessBuild

农场老马的专栏 2698

【opencv】示例-application_trace.cpp 跟踪应用程序执行的宏

[ INFO:0@0.061] global videoio_registry.cpp:244 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(9, sorted by priority): FFMPEG(1000); GSTREAMER(990); IN...

cxyhjl的博客 915

C++Builder新建Console Wizard控制台向导程序

C++Builder默认是bcb窗口程序(带有Form界面)。现在需要C++Builder软件编译生成*.exe可执行文件(不需要Form界面),双击【应用程序】直接执行代码功能。 (1) File---New…---Console Wizard(控制台向导) (2) 选择 C++,勾选Console Application(控制台应用程序)。 (3) View中,可以打开Project Manager(项目管理器) (4) 写入自己的功能代码: (5) 新增*.cpp文件和*.h文件:

菜鸟打怪的博客 739

基于MATLAB C/C++数学函数库开发应用程序

基于MATLAB应用程序接口开发应用程序的目的一般分为三种:1.         为了建立MATLAB与其他应用程序间的数据交换,这主要是MAT文件应用程序来完成的。2.         为了充分利用其他应用程序的优点如计算速度快和已有的算法程序,从而避免重复的开发,这主要是通过MEX文件来完成的。3.         为了拓广MATLAB的应用范围和应用手段,如在VB、VC中对MAT

njustcxy的专栏 4293

QT linux下应用程序打包

(1)在当前位置打开终端。

weixin_51795597的博客 1329

Python 嵌入 C/C++ 应用程序全攻略

本文围绕在 C/C++ 应用程序中嵌入 Python 展开,详细阐述了嵌入 Python 的基础概念、初始化与终止流程、Python 解释器的使用方法、模块和对象的操作、错误处理与异常捕获等内容。同时,着重加入了 Python C 扩展模块调试过程的详细步骤,提供了丰富的代码示例和实用技巧,帮助开发者全面掌握在 C/C++ 中嵌入 Python 的技术以及调试扩展模块的方法,实现更强大的应用程序功能。

Tekin 是深耕技术 20 年的全栈实战派专家,精通 Go/Python/Java 等多语言开发。博客专注技术原理与实战结合,深度解析 Python 高阶编程、Go 语言架构、数据库优化等硬核内容。涵盖并发编程、机器学习、云原生等前沿领域,通过真实案例拆 1547

【C/C++】程序中如何执行操作系统命令?

   在我们编写C或者C++程序时候,有时候会碰到要求执行操作系统命令或者其他应用程序,同时要么需要获取命令执行的输出,要么不需要获取命令执行的输出,针对这两点,我分别各介绍一方式   1:  方法一: system 函数       直接上示例大家更容易理解:        if (0 != system("/bin/echo \"hello world\""))        {    ...

weilin1982的博客 3422
上一篇: C++ 接收命令行参数
下一篇: C++ 自删除程序代码
lbjayo
博客等级 码龄19年 9粉丝 11原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lbjayo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值