Hi,
first of all, I moved it to the C++ forum, as it's more a generic problem then a Qt problem.
I assume, you cxall the function with a string and then (outside the function) the string is not changed, right?
Zhis comes due to the fact, that cou call the function with a copy of your string you want to change. If you want to modify the original string, you need a pointer or a reference:
@
void Convert(QString& givenphonenum)
{
}
@
The second problem you have, is that the string might be shorter then 100 chars. Try out the following:
@
void Convert(QString& givenphonenum)
{
for (int i = 0; i < givenphonenum.length(); i++)
{
}
}
@