string in c++,question
- by user189364
Hi,
I created a program in C++ that remove commas (') from a given integer. i.e. 2,00,00 would return 20000. I am not using any new space. Here is the program i created
void removeCommas(string& str1,int len)
{
int j=0;
for(int i=0;i<len;i++)
{
if(str1[i] == ',')
continue;
else
{
str1[j] =str1[i];
j++;
…