Programming Reference/Librarys
Question & Answer
Q&A is closed
This is an old revision of the document!
textheight & textwidth are functions declared/ defined in graphics header. this functions returns height and width of the text.
#include<graphics.h> #include<stdio.h> #include<conio.h> main() { int gd = DETECT, gm, text_height, text_width; char string[100]; initgraph(&gd, &gm, "C:\\TC\\BGI"); text_height = textheight("Hello programmers"); text_width = textwidth("Hello programmers"); sprintf(string,"height of text = %d width of text = %d",text_height,text_width); outtext(string); getch(); closegraph(); return 0; }
no example at the moment