source:
trunk/util.cpp
@
3
Last change on this file since 3 was 2, checked in by , 16 years ago | |
---|---|
File size: 325 bytes |
Line | |
---|---|
1 | #include <iomanip> |
2 | #include <sstream> |
3 | #include <string> |
4 | |
5 | using namespace std; |
6 | |
7 | std::string str_of_addr(const int address) |
8 | { |
9 | std::stringstream s; |
10 | s << "0x" << std::uppercase << std::setw(8) << std::setfill('0') << hex << address; |
11 | |
12 | //std::string str = s.str(); |
13 | std::string str; |
14 | s >> str; |
15 | |
16 | return str; |
17 | } |
Note: See TracBrowser
for help on using the repository browser.