测试文章

235 阅读2分钟
  • 没有完成
  • 完成
  1. 没有完成
  2. 完成
  • 1
  • 2
  • 3
  1. 2
  2. 3
  3. 4
#include <iostream>
#include <conio.h>
#include <Windows.h>
using namespace std;
void printMenu() {
	system("cls");
	cout << "\t\t\t\t==========================" << endl;
	cout << "\t\t\t\t[   北京地铁线路小助手   ]" << endl;
	cout << "\t\t\t\t==========================" << endl;
	cout << "\t\t\t\t[     [ ]查看所有站点    ]" << endl;
	cout << "\t\t\t\t[     [ ]查看地铁线路    ]" << endl;
	cout << "\t\t\t\t[     [ ]路线规划        ]" << endl;
	cout << "\t\t\t\t[     [ ]价格计算        ]" << endl;
	cout << "\t\t\t\t[     [ ]站点查询        ]" << endl;
	cout << "\t\t\t\t[     [ ]打开线路图      ]" << endl;
	cout << "\t\t\t\t[     [ ]系统维护        ]" << endl;
	cout << "\t\t\t\t[     [ ]退出本系统      ]" << endl;
	cout << "\t\t\t\t==========================" << endl;
	cout << "\t\t\t\t[ Jerry Coding With Love ]" << endl;
	cout << "\t\t\t\t==========================" << endl;
	return;
}
void printSelection(short x, short y, bool isClear = false) {
	CONSOLE_SCREEN_BUFFER_INFO cursorInfo;
	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
	GetConsoleScreenBufferInfo(hOut, &cursorInfo);
	COORD bakPos = cursorInfo.dwCursorPosition;
	COORD pos = { x,y };
	SetConsoleCursorPosition(hOut, pos);
	if (isClear) {
		cout << " ";
	}
	else {
		cout << "@";
	}
	SetConsoleCursorPosition(hOut, bakPos);
	return;
}

int main() {
	short defaultX = 39;
	short defaultY = 3;
	char inputChar;
	int currChoice = 0;
	printMenu();
	printSelection(defaultX, defaultY);
	while (1) {
		inputChar = _getch();
		if (inputChar == 13) {
			// 循环条件:输入的字符不等于回车
			break;
		}
		if (inputChar == 119 && currChoice > 0) {
			// 箭头向上移动
			printSelection(defaultX, defaultY, true);
			printSelection(defaultX, --defaultY);
			currChoice--;
		}
		else if (inputChar == 115 && currChoice < 7) {
			// 箭头向下移动
			printSelection(defaultX, defaultY, true);
			printSelection(defaultX, ++defaultY);
			currChoice++;
		}
	}
	cout << "Your Choice:" << currChoice;

	return 0;
}

const a = 111;

Markdown Basic Syntax

I just love bold text. Italicized text is the cat's meow. At the command prompt, type nano.

My favorite markdown editor is ByteMD.

  1. First item
  2. Second item
  3. Third item

Dorothy followed her through many of the beautiful rooms in her castle.

import { Editor, Viewer } from 'bytemd';
import gfm from '@bytemd/plugin-gfm';

const plugins = [
  gfm(),
  // Add more plugins here
];

const editor = new Editor({
  target: document.body, // DOM to render
  props: {
    value: '',
    plugins,
  },
});

editor.on('change', (e) => {
  editor.$set({ value: e.detail.value });
});

GFM Extended Syntax

Automatic URL Linking: github.com/bytedance/b…

The world is flat. We now know that the world is round.

  • Write the press release
  • Update the website
  • Contact the media
SyntaxDescription
HeaderTitle
ParagraphText

Footnotes

Here's a simple footnote,1 and here's a longer one.2

Footnotes

  1. This is the first footnote.

  2. Here's one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    { my code }

    Add as many paragraphs as you like.