We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have writtena function to display string of characters using pointer but it shows error. can anybody what is the error in it?
void WriteString(char *Buff) { int nStringLength; int nLoop; nStringLength = strlen(Buff); for(nLoop=0;nLoop<=nStringLength;nLoop++) { SBUF = Buff(nLoop); while(!TI); TI = 0; } Delay(50); return; }
when compiling there is a error pointing the line,
SBUF = Buff(nLoop); The error is,
Error C211 : call not to a function Error C208 'function':too many actual parameters.
As dan pointed it should be [ ] or alternately use SBUF= *Buff and Buff++