Creates a single QR Code, then prints it to the console.
| 63 | |
| 64 | // Creates a single QR Code, then prints it to the console. |
| 65 | static void doBasicDemo() { |
| 66 | const char *text = "Hello, world!"; // User-supplied text |
| 67 | const QrCode::Ecc errCorLvl = QrCode::Ecc::LOW; // Error correction level |
| 68 | |
| 69 | // Make and print the QR Code symbol |
| 70 | const QrCode qr = QrCode::encodeText(text, errCorLvl); |
| 71 | printQr(qr); |
| 72 | std::cout << toSvgString(qr, 4) << std::endl; |
| 73 | } |
| 74 | |
| 75 | |
| 76 | // Creates a variety of QR Codes that exercise different features of the library, and prints each one to the console. |
no test coverage detected