On Sat, Aug 28, 2010 at 4:30 AM, sonu kumar <[email protected]> wrote: > hi, > Am looking for an solution to write a function similar to printf() in C. > I know it's going to be hardware and OS dependent.. > Logic is to find the terminal file and write into it. > But where and which file/dir ,i have to look for to do the same in Linux ?
Use varargs (google for it) and "write(1, buf, sizeof(buf));" (1 is the filehandle for stdout => it writes to terminal). SB -- l...@iitd - http://tinyurl.com/ycueutm
