Re: Trouble in concatenate a value to a string

2013-10-31 Thread Rafael Ratacheski
The stringstream worked perfectly. thank you very much 2013/10/31 Schmoll Walter > … > > returned += static_cast (*bp++); > > … > returned += static_cast (*bp++); > > … > > > > I never used std::string, so I’m no expert. But according to > http://www.cplusp

Re: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
ew >> bits wider J. Use this type instead of void * or unsigned char *. >> >> And by the way: Why don’t you use a function like snprint_objid, which is >> part of net-snmp lib? >> >> I haven’t read your code in detail, so maybe I’m wrong.**** &g

RE: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
d, which is > part of net-snmp lib? > > I haven’t read your code in detail, so maybe I’m wrong. > > ** ** > > Walter > > ** ** > > *From:* Rafael Ratacheski [mailto:rafaelratache...@gmail.com] > *Sent:* Dienstag, 29. Oktober 2013 19:51 > *To:* net-sn

Re: Trouble in concatenate a value to a string

2013-10-29 Thread Magnus Fromreide
On Tue, 2013-10-29 at 18:51 +, Rafael Ratacheski wrote: > Hello, I'm having problem in concatenate the oid value in a > string. I've tried several possible ways, but all unsuccessfully. Can > you help me? My code is >From looking at your code it is unclear what type the buf argument is suppos

Trouble in concatenate a value to a string

2013-10-29 Thread Rafael Ratacheski
Hello, I'm having problem in concatenate the oid value in a string. I've tried several possible ways, but all unsuccessfully. Can you help me? My code is string print_ip(const void* buf, size_t buflen) { unsigned const char* bp = (unsigned const char*) buf; string returned("test:"); s