I changed the code to

Code:
else
{
	string strSubject;
	string strBody;
	
	while(getline(fpEnvelopeConfigFile, strSubject, '#'))
	{
		strEnvSubject+=strSubject;
		
		while(getline(fpEnvelopeConfigFile, strBody))
		{
			strEnvBody+=strBody;
		}
	}
}
The code now works fine. The only problem is the indentation in the text file is not retained. How can I retain the indentation?

Also, is there a problem in using static strings in my code?