cout receives modifiers like hex, dec to change the way it outputs the data.

This works as a state machine so after we change it this stays unless we reset the state. So in this case after we print hex data we change in the end of the method to reuse again the decimal default output format
This commit is contained in:
Balhau 2018-12-02 10:22:09 +00:00
parent a794464432
commit 3806e6d47e

View file

@ -32,6 +32,9 @@ namespace Core {
static const UChar SHIFT_16 = 16;
static const UChar SHIFT_8 = 8;
/**
* Template function (generics) to enable the printing of several datatypes
*/
template<typename Number>
static void printHex(Number *num,Int len) {
for(int i=0;i<len;i++){
@ -40,7 +43,7 @@ namespace Core {
cout << ",";
}
}
cout << endl;
cout << std << endl;
};
/**