Hullo I'm trying to read several pieces of text from various textboxes, and throw them into a textfile on separate lines, here's what I'm using so far:
Code:
struct QuestionTemplate
{
char Q[1000]; //Holds the Question
char A[250]; //Holds the Answer
};
QuestionTemplate NewQ;
Questions = fopen(Path, "a");
GetWindowText(txQuestion, NewQ.Q, GetWindowTextLength(txQuestion) + 1);
fprintf(Questions, NewQ.Q);
GetWindowText(txAnswer, NewQ.A, GetWindowTextLength(txQuestion) + 1);
fprintf(Questions, NewQ.A);
The problem is that it writes it all to one line, and I'm hoping to get various lines in there. Is there something I have to concatenate to the end of the character arrays? And, if so, what would it be?
Thanks