MCPcopy Create free account
hub / github.com/DSVVA/MHY_Scanner / doBasicDemo

Function doBasicDemo

3rdparty/QR-Code-generator/cpp/QrCodeGeneratorDemo.cpp:65–73  ·  view source on GitHub ↗

Creates a single QR Code, then prints it to the console.

Source from the content-addressed store, hash-verified

63
64// Creates a single QR Code, then prints it to the console.
65static 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.

Callers 1

mainFunction · 0.85

Calls 2

printQrFunction · 0.85
toSvgStringFunction · 0.85

Tested by

no test coverage detected