V
Vaddina Prakash Rao
Google was not able to retreive the message .. so I couldnt write a
followup .. I guess this one will be displayed as a new post ...
anyways, thank you all people for all your replies ..
can you please clear one more question ..
As you have said, the cast is not needed, in the following statement
...
But when i execute the program without the cast, as below,
i get the error
"Invalid conversion from void* to char*"
Any explanation for this ..
thanks again ..
followup .. I guess this one will be displayed as a new post ...
anyways, thank you all people for all your replies ..
can you please clear one more question ..
As you have said, the cast is not needed, in the following statement
...
final = (char *) malloc (count * sizeof(char));
if (!(final = (char *)malloc(count + 1)))
But when i execute the program without the cast, as below,
final = malloc (count * sizeof(char));
if (!(final = malloc(count + 1)))
i get the error
"Invalid conversion from void* to char*"
Any explanation for this ..
thanks again ..