#include <string>
#include <iostream>
#include <qrinvoice/code_parser.hpp>
#include <qrinvoice/model/qr_invoice.hpp>
#include <qrinvoice/model/parse_exception.hpp>
// ...
std::string spc = "SPC\n"
"...";
try {
qrinvoice::model::qr_invoice qrinvoice = qrinvoice::code_parser::parse(spc);
// access QR-Invoice structure
const double amount = qrinvoice.get_payment_amount_info().get_amount();
std::cout << amount << std::endl;
// ...
} catch (const qrinvoice::model::parse_exception &exception) {
// parsing exception handling
}