Klicken Sie auf C ++: So verarbeiten Sie das Byte -Array in SELECT

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Klicken Sie auf C ++: So verarbeiten Sie das Byte -Array in SELECT

by Anonymous » 01 Feb 2025, 08:44

Klicken Sie hier auf C ++ - Client von hier < /p>
Einfach ausgewählt wie diese, keine Überprüfungen und Fehlerbehandlungen, um den Code zu vereinfachen: < /p>

Code: Select all

client.Select("SELECT hash, name FROM default.table", [] (const Block& block)
{
// byte array in the cell
auto object = block[0]->As()->At(0);
// how to get the result as a pointer to unsigned char and size of this memory block????
auto begin_of_array = object.begin(); // but how to convert this to unsigned char*???
auto size = object.size(); // this looks clear
// supposed a wrapping by std::span and pass to algorithm as c-style array
}
);
Die Frage lautet:
Wie kann man den Wert der Byte -Array -Spalte als C -Array erhalten - vorzeichenloses Zeichen* und Größe?

Top