#include
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR lpCmdLine,
int nCmdShow) {
MessageBox(NULL, TEXT(“勇者の攻撃!”),
TEXT(“スライムが現れた!”), MB_OK);
return 0;
}
#include
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR lpCmdLine,
int nCmdShow) {
MessageBox(NULL, TEXT(“勇者の攻撃!”),
TEXT(“スライムが現れた!”), MB_OK);
return 0;
}
#include
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) {
switch (msg) {
case WM_DESTROY:
MessageBox(hwnd, TEXT(“魔王を倒した”),
TEXT(“勇者の攻撃”), MB_ICONINFORMATION);
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, msg, wp, lp);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpCndLine, int nCmdShow) {
HWND hwnd;
MSG msg;
WNDCLASS winc;
winc.style = CS_HREDRAW | CS_VREDRAW;
winc.lpfnWndProc = WndProc;
winc.cbClsExtra = winc.cbWndExtra = 0;
winc.hInstance = hInstance;
winc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
winc.hCursor = LoadCursor(NULL, IDC_ARROW);
winc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
winc.lpszMenuName = NULL;
winc.lpszClassName = TEXT(“勇者”);
if (!RegisterClass(&winc))return 0;
hwnd = CreateWindow(
TEXT(“勇者”), TEXT(“勇者の攻撃!”),
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100, 100, 200, 200, NULL, NULL,
hInstance, NULL
);
if (hwnd == NULL)return 0;
while (GetMessage(&msg, NULL, 0, 0))DispatchMessage(&msg);
return msg.wParam;
}
#include
int main(){
int x = 0;
std::cout << "整数を入力してください:";
if(std::cin >> x){
std::cout << "入力した整数は" << x << "です。" << std::endl;
}else{
std::cout << "不正な入力" << std::endl;
}
return 0;
}
index.html
‘use strict’;
console.log(‘Hello World from main.js’);
main.js
#include
int main(void)
{
int value;
value = 10;
printf(“%dn”, value);
value++;
printf(“%dn”, value);
value–;
printf(“%db”, value);
return 0;
}
#include
int main(void)
{
printf(“%d”, 100);
return 0;
}
#include
int main(void)
{
printf(“HelloWorld!”);
return 0;
}
$n * 1.1,
$prices
);
print_r($newPrices);