Archicad C++ API
About Archicad add-on development using the C++ API.

changing a char[] case

TomWaltz
Participant
I am trying to change the case of a char array to all lower case.

I have
#include "ctype.h"
...
for (i=0; i <= 15 ; i++)
	{
		buffer(i) = std::tolower (buffer(i));
	}
and keep getting "Call of non-function error" from Codewarrior when I compile.

I tried tolower with std:: and without, and it makes no difference. I checked, and ctype.h does have the header for tolower in it.

Am I missing some simple step here?
Tom Waltz
3 REPLIES 3
Oleg
Expert
may be buffer ?
TomWaltz
Participant
Oleg wrote:
may be buffer ?


Thanks, Oleg. I knew it had to be simple.

yes, I am an idiot......
Tom Waltz
Ralph Wessel
Mentor
TomWaltz wrote:
I am trying to change the case of a char array to all lower case.
You may also want to consider using the string utilities in the ArchiCAD API - in this case 'CHtoLower' for example.
Ralph Wessel BArch
Software Engineer Speckle Systems