``
```
#include "stdafx.h"
#include <tchar.h>
#include <windows.h>
#include <stdio.h>
#include "resource.h"
#include <locale.h>
#include <process.h>
#include "Project1win2console181010a.h"
#define MAX_LOADSTRING 100
// 全局变量:
HINSTANCE hInst; // 当前实例
WCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本
WCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名
// 此代码模块中包含的函数的前向声明:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
//
AllocConsole();
#pragma warning(disable:4996)
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stdout);
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stderr);
_tfreopen(TEXT("CONIN$"), TEXT("r"), stdin);
#pragma warning(default:4996)
_tsetlocale(LC_ALL, TEXT("chs"));
printf("pi:");
printf("%lf", 3.1415926);
printf("%d", 3.1415);
//
// TODO: 在此处放置代码。
// 初始化全局字符串
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_PROJECT1WIN2CONSOLE181010A, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// 执行应用程序初始化:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
```
重点是头文件;
和:
``
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
函数当中的:
(第40行左右的):打开 AllocConsole()窗口语句:
```
AllocConsole();
#pragma warning(disable:4996)
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stdout);
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stderr);
_tfreopen(TEXT("CONIN$"), TEXT("r"), stdin);
#pragma warning(default:4996)
_tsetlocale(LC_ALL, TEXT("chs"));
```
- R高精“密率”-PI的分数的高精度表示形式-R语言181000a
- 高精“密率”-PI的分数的高精度表示形式181001
- java40k2011Terryfix181002
- PI的高精度分数表示形式180101
- c++算PI的分数表示形式180102
- 单圆弧的反射181001a
- 单个圆的圆弧反射181020a
- 附录11:181001非控制台(WindowsForm)窗口程序创建控制台(调试程序用
- 递归调用-判断两圆相碰撞情况181020
- 用递归算法模拟两圆反射Billiards181020
- 光线(粒子)在两圆间碰撞效果1810a
- 光线粒子在两圆内壁碰撞效果1810B
- twoBillards模拟光线(粒子)在重叠的两圆内壁的碰撞C++完整代码(带注释)Terry181001