I am reading a char array newpath that contains C:\\Program Files\\test software\\app . How to substitute the space to underscore character?
char newPath2[MAX_PATH];
int newCount2 = 0;
for(int i=0; i < strlen(newPath); i++)
{
if(newPath[i] == ' ')
{
newPath2[i] = '_';
}
newPath2[newCount2]=0;
}