C语言访问一个链接

版权声明:编写不易,可看不可转,请知悉! https://blog.csdn.net/zha6476003/article/details/85255975

示例代码1:

# include <Windows.h>
int main(){
	
	system("start http://""www.baidu.com");
	
	return 0;
}

示例代码:

# include <stdio.h>
# include <string.h>
# include<Windows.h>

int main(){
	
	char a[20] = "start http://";
	char b[20] = "www.baidu.com"; //指定一个长度够就行不指定程序会死 
	
	strcat(a,b); //合并字符串 
	//printf("%s",a);
	system(a);
	
	return 0;
}
执行结果如下图:

猜你喜欢

转载自blog.csdn.net/zha6476003/article/details/85255975