1. 效果
2. 需要的代码(QRCode)
3. 代码 - #include <stdio.h>
- #include "qrcode.h"
- int main()
- {
- //拓展编码
- SetConsoleOutputCP(437);
- QRCode qrcode;
- uint8_t qrcodeBytes[qrcode_getBufferSize(3)];
- qrcode_initText(&qrcode, qrcodeBytes, 3, ECC_LOW, "Hello World!");
- for (uint8_t y = 0; y < qrcode.size; y++)
- {
- for (uint8_t x = 0; x < qrcode.size; x++)
- {
- if(qrcode_getModule(&qrcode, x, y))
- {
- printf("%c%c",219,219);
- }
- else
- {
- printf(" ");
- }
- }
- printf("\n");
- }
- while(1);
- }
复制代码
4. 方块打印方法
C语言输出ASCII 219无法显示方格 |