Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
630 B
1
Indexable
#include <iostream>
#include <string>
#include <windows.h>
#include <shellapi.h>
int main() {
	int a;
	int b = 0;
	const char* c[8];
	c[0] = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
	c[1] = "https://www.youtube.com/watch?v=mV5xJT7BnzE";
	int len = MultiByteToWideChar(CP_ACP, 0, c[0], -1, NULL, 0);
	wchar_t* wstr = new wchar_t[len];
	for (int i = 0; i < 8; i++)
	{
	MultiByteToWideChar(CP_ACP, 0, c[0], -1, wstr, len);
	}
	for (int i = 0; i < 8; i++)
	{
	std::cin >> a;
	switch (a)
	{
	case 1:
		ShellExecute(0, 0, wstr, 0, 0, SW_SHOW);
		break;
	case 2:
		break;
	default:
		return 0;
	}
	}
}
Leave a Comment