Open 369Martin369 opened 1 month ago
CharGPT will often hallucinate. You cannot take its suggestions at face value and will often have to do additional research beyond code it proposes.
(my low-level libraries tend to be exclusively C, so if you see C++ syntax it is likely a hallucination)
Hi, Code ChatGPT suggested:
String generateQRCode(const String& data) { QRCode qrcode; uint8_t qrcodeData[qrcode_getBufferSize(3)]; qrcode_initText(&qrcode, qrcodeData, 3, 0, data.c_str());
String qrCodeHtml = "<img src=\"data:image/png;base64,"; qrCodeHtml += qrcode_getQRCode(&qrcode); qrCodeHtml += "\">";
return qrCodeHtml; }
But..."qrcode_getQRCode" is not declared in qrcode.h!: How comes that ChatGPT thinks this is part of Richard Moore's library??