On 20/09/06, Toth, Gregory S <[EMAIL PROTECTED]> wrote: > I got it to work finally. For some reason, doing the snprintf as > described in my previous post did not always work: > > snprintf(this_index, strlen((char *)*my_loop_context), > "%s",(const char*)*my_loop_context);
I doubt it's the C++ string, or separate variable that's the answer here. I strongly suspect that the culprit is the 'strlen(*my_loop_context)' snprintf takes the size of the *destination* buffer - not the data to put in it. So > snprintf(temp_index, SPRINT_MAX_LEN, > "%s",(const char*)*my_loop_context); would probably do the trick. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders