The below code take the entry from the user in a window and then displays the text back.
The problem is it runs once fine, but if used a number of times it starts accepting much lesser text. One of my collegue said probably the buffer is getting filled, so delete the .obj file and recompile it. But with no success..
pls somebody guide me..
#include <stdio.h>
#include <conio.h>
main()
{
clrscr();
window(10,10,70,20);
textcolor(WHITE);
char string[512];
char *p;
cprintf("Enter a string \r\n");
p = cgets(string);
cprintf("\r\n Your text is : %s", p);
}
- vivekjk