Hi again !!!
Using VC++, I want to extract a substring (name) from another
string (infile):
-------------//----------------------
void dodo(char *infile) {
int lgt;
lgt = strlen(infile);
char name[10];
for (int x=0; x<=lgt-5; x++)
name[x]=infile[x];
printf ("name=%s",name);
...
-------//----------------
But what I get is this:
name = JohnÌÌÌÌÌ
How can I remove those strange characters???
TIA.
Using VC++, I want to extract a substring (name) from another
string (infile):
-------------//----------------------
void dodo(char *infile) {
int lgt;
lgt = strlen(infile);
char name[10];
for (int x=0; x<=lgt-5; x++)
name[x]=infile[x];
printf ("name=%s",name);
...
-------//----------------
But what I get is this:
name = JohnÌÌÌÌÌ
How can I remove those strange characters???
TIA.