> I'm using Lope's Colour...my question - How can I add the colours to
> variables? Not character strings...variables.

"Not character strings...variables."
That bothers me.. a variable just points to a character string.
I assume you mean you know how to add color to a string constant in the
code, but not how to get it into a string while running?
Reading "man string" will show you all of the functions in C for working
with strings.

> sprintf({rbuf,ch);

Yeah, that won't work :)

It's pretty simple though.  Usually it'll be more like:
  sprintf(buf, "{Rsomething in red\n\r");
or
  strcpy(buf, "{Rsomething in red\n\r");
or
  strcpy(buf, "{R");
  strcat(buf, "something in red\n\r");
and so on...
Find a book on C with a chapter about strings or something...
--Palrich.



Reply via email to