自制无线共享工具C++源代码

// wire.cpp : 定义控制台应用程序的入口点。
//

#include 
#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;
}

你可能感兴趣的:(自制无线共享工具C++源代码)