Original Post
Hi,
I''m working on a very very simple routine to remove any spaces from an char* var and replace them with "_". I wrote this lil'' routine but I get a weird error(Using the free mingw compiler, cause I''m not allowed to install VC++ 6 so I downloaded Dev-C++ 4).
The error I get is:
86 errorlog.cpp assignment to ''char'' from ''const char*'' lacks a cast
Anyone???????
Sand Hawk
Member of the Stupid Coders.
http://www.stupidcoders.cjb.net
-Earth is 98% full. Please delete anybody you can.
har* ReplaceSpace(char* What)
{
int iTeller;
for (iTeller = 0; iTeller < strlen(What); iTeller++)
{
if (What[iTeller] = " ")
What[iTeller] = "_";
}
return What;
}
|