hi, i'm new to this forum

i have been learning c programmin for a bit now, I have this problem, i want to have make something like a message box which allows you to enter 25 line MAX. IF you wish to stop, double enter to quit.

The only problem is that the text for the message field is not aligned ( to get a clear picture of what i m saying, please run this code in your complier. I use Turbo C 3.0)

I want to align all the text that you enter for the next line start from the same location right under from the first line.

Code:
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#define MAXLINES 25

main()
{
clrscr();
char name[15];
char subject[15];
char msg[100];

textcolor(7);gotoxy(3,5);
cprintf("Name:");
gets(name);
textcolor(7);gotoxy(3,7);
cprintf("Subject:");
gets(subject);
textcolor(7);gotoxy(3,9);
cprintf("Message:");
gets(msg);


int get_lines(char *lines[]);

 char *lines[MAXLINES];

     int number_of_lines;

     /* Read in the lines from the keyboard. */

     number_of_lines = get_lines(lines);

     if ( number_of_lines < 0 )
     {
	 puts(" Memory allocation error");
	 exit(-1);
    }

     return(0);
 }

 int get_lines(char *lines[])
 {
     int n = 0;
     char buffer[80];  /* Temporary storage for each line. */

     gotoxy(3,9);cprintf("Message:");

     while ((n < MAXLINES) && (gets(buffer) != 0) &&
	    (buffer[0] != '\0'))
     {
	 if ((lines[n] = (char *)malloc(strlen(buffer)+1)) == NULL)
	     return -1;
	 strcpy( lines[n++], buffer );
     }
     return n;


}
i thought of using a for loop along with gotoxy();
but not sure how?
i would like a little help...
thanks..
amaR