标签:
// wire.cpp : 定义控制台应用程序的入口点。
//
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
for (;;)
{
cout << "1开启无线,2重新设置无线,3关闭无线:";
int n;
cin >> n;
if (n == 1)
system("netsh wlan start hostednetwork");
else if (n == 2)
{
char destination[100] = "netsh wlan set hostednetwork mode=allow ssid= ";
char ssid[100], key[100], keyh[100] = " key=", *k = " ";
cout << "请输入无线名字:";
cin >> ssid;
cout << endl;
cout << "请输入无线密码:";
cin >> key;
cout << endl;
strcat(destination, ssid);
strcat(destination, keyh);
strcat(destination, key);
system(destination);
system("netsh wlan start hostednetwork");
}
else
system("netsh wlan stop hostednetwork");
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/deemonliang/p/4874219.html