Converting to lower case errors
#2

Quote:
Originally Posted by Davi52
View Post
Hey, I have some errors and warnings regarding to this function:
Code:
21: CorrectCaps(const string[],dest[]="",len=0)
22: {
23:  	for(new i=1;i<strlen(string);i++)
24:		if(string[i]>64 && string[i]<94)
25:			string[i]+=32;
26:	dest[0]=EOS;
27:	strcat(dest,string,len);
28:	return string;
29: }
The errors:
Code:
(25) : error 022: must be lvalue (non-constant)
(25) : warning 217: loose indentation
(25) : error 017: undefined symbol "i"
(25) : warning 215: expression has no effect
(26) : warning 217: loose indentation
Possibly something to do with on this line:
Code:
CorrectCaps(const string[],dest[]="",len=0)
Perhaps it should be like this?:
Code:
CorrectCaps(const string[],dest[],len=0)
Reply


Messages In This Thread
Converting to lower case errors - by Davi52 - 29.01.2020, 14:17
Re: Converting to lower case errors - by Proxus - 29.01.2020, 14:21
Re: Converting to lower case errors - by Calisthenics - 29.01.2020, 15:31
Re: Converting to lower case errors - by Joe Staff - 29.01.2020, 18:56
Re: Converting to lower case errors - by Kwarde - 29.01.2020, 18:56

Forum Jump:


Users browsing this thread: 1 Guest(s)