Hi all,

The code below works fine when and displays the counter as required,
however when i run the program with the debugger i get an odd string
of characters output instead of numbers:

îþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþî

Here is the code, any idea what might be going wrong here??

function call:
countOutp->value(GetCountString());  //output as c style string

Implementation:

const char* ListBuilder::GetCountString()
{
    string outputStr;           //temp output string
    ostringstream countVal;     //convert int value to string
    countVal << count;          //convert count integer to char string
    outputStr = countVal.str(); //assign contents to string object

    return outputStr.c_str();   //return as c style string
}


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to