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:
parent
a794464432
commit
3806e6d47e
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue