Quote:
to access first letter u use strng[0], second letter strng[1]


While this will work in C for a char array it will NOT work in lite-c.

STRING is defined in atypes.h as
Code:
typedef struct STRING {
	C_LINK	link;
	char	*chars;		// pointer to null terminated string
	long	length;		// allocated length of string
	long	flags;		// see STRF_... above
    byte    pad[PAD_STRING];
} STRING;


Therefore you must access the character data as (strname.chars)[index]. The first character is index = 0 etc. Just remember that STRING* is not the same as char*.


Our new web site:Westmarch Studios