用C++打开指定网址

这个非常简单,首先你要知道用命令提示符打开网址:
start 你的网址
例如:
在这里插入图片描述
这样,再敲一个回车就可以了。
用C++就是system(“命令提示符指令”),这样,我们就可以写出打开网站的程序了了,示例:

#include<bits/stdc++.h>
using namespace std;
int main() {
	system("start http://www.baidu.com/");

    return 0;
}
原创文章 75 获赞 126 访问量 1万+

猜你喜欢

转载自blog.csdn.net/liuzich/article/details/103793345