GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ByteConvert_cpp/examples/bytes_to_int.cpp at master · SloCompTech/ByteConvert_cpp Expand file tree/ Copy pathbytes_to_int.cppMore file actions 21 lines (17 loc) · 496 Bytes / Copy pathbytes_to_int.cppFile metadata and controls21 lines (17 loc) · 496 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include <cstdint> #include <cstring> #include <ByteConvert/ByteConvert.cpp> int main() { // Create array of bytes that represent 1 (type: int) uint8_t block[sizeof(int)]; memset(block,0,sizeof(int)-1); block[sizeof(int)-1] = 1; int val = ByteConvert::to_variable<int>(block); // Convert array of bytes to int if (val != 1) { // Check if we got, what we expected to get // Error, something went wrong return -1; } // Success return 0; } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |