Qt Code:
QByteArray byte; int num = 43981; for(int i=sizeof(int)-1; i>0; i--){ byte.append((char)(num>>i)); }To copy to clipboard, switch view to plain text mode
Note: didn't test it.
Qt Code:
QByteArray byte; int num = 43981; for(int i=sizeof(int)-1; i>0; i--){ byte.append((char)(num>>i)); }To copy to clipboard, switch view to plain text mode
Note: didn't test it.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks