online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; #include "headerImpl.h" int main() { uint8_t data[] = {0x00, 0x12, 0x00, 0x00, 0x34, 0x00, 0x59, 0xAF}; int64_t uidNbr = handleOpenSession(data); cout<<uidNbr; return 0; }
#include "util.h" template<class T> T fromBigEndin(uint8_t *buf) { T number = 0; uint8_t nBytes = sizeof(T); uint8_t i; for (i = 0; i < nBytes; i += 1) { number += buf[i] << (16 * (nBytes - i - 1)); } return number; } template <> int64_t fromBigEndin<int64_t>(uint8_t *buf); template <> long long fromBigEndin<long long>(unsigned char *buf);
#pragma once #include <cstdint> template <class T> T fromBigEndin(uint8_t *buf);
#pragma once #include "util.h" int64_t handleOpenSession(uint8_t *data) { int64_t uidNbr = fromBigEndin<int64_t>(data); return uidNbr; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue