Hi!
I'm using VC++ 6.0. I want to create a substring (name) from another string (infile):
---------------//---------------
#include <string.h>
....
void dodo(char *infile) {
char name;
int lgt;
lgt = strlen(infile);
name = infile.substr(5,10);
}
--------------//------------------
But I get this error:
error C2228: left of '.substr' must have class/struct/union type
What am I doing wrong?
Regards.
I'm using VC++ 6.0. I want to create a substring (name) from another string (infile):
---------------//---------------
#include <string.h>
....
void dodo(char *infile) {
char name;
int lgt;
lgt = strlen(infile);
name = infile.substr(5,10);
}
--------------//------------------
But I get this error:
error C2228: left of '.substr' must have class/struct/union type
What am I doing wrong?
Regards.