zoukankan      html  css  js  c++  java
  • C-sysytem命令的使用

    #include <stdio.h>
    
    
    
    void main()
    {
    	printf("hello world!!");
    	getchar();
    	
    }
    

      

    system命令

    #include <stdlib.h>
    
    
    void main() {
    	//system("ipconfig");
    	system("mspaint");
    	system("pause");
    }
    

      

    ShellExecute

    也可以用来打开程序启动

    #include<stdio.h>
    #include<Windows.h>
    
    
    void main() {
    	printf("核力量");
    	MessageBox(0, "窗口内容:11111111", "窗口标题", 0);
    	//第一个参数 设置0  是依赖的窗口编号    0表示是系统弹出来
    	//第四个参数 是窗口的类型,设置为0 即可。
    
    	//打开文件的操作
    	/*ShellExecute(0, "open", "C:\Users\水杉科技\Desktop\test.txt", 0, 0, 1);
    	ShellExecute(0, "open", "https://www.baidu.com", 0, 0, 1);
    	ShellExecute(0, "open", "https://www.csdn.net", 0, 0, 1);*/
    	//ShellExecute(0, "print", "C:\Users\水杉科技\Desktop\test.txt", 0, 0, 1);
    	ShellExecute(0, "open", "notepad", 0, 0, 1);
    
    
    
    	getchar();
    }
    

      

  • 相关阅读:
    2014年广州区域赛k题解
    2014年广州区域赛e题解
    2014年广州区域赛i题解
    最大化平均值问题
    codeforces 976e 题解
    maven
    机器学习入门
    拟合
    插值
    熵权法
  • 原文地址:https://www.cnblogs.com/Mengchangxin/p/11630047.html
Copyright © 2011-2022 走看看