No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
1 Posted Topic
[CODE]char *ReadFile(string& filepath) { string buffer=""; char temp_char; ifstream file; file.open(filepath); while(!(file.eof())) { file.get(temp_char); buffer+=temp_char; } size=buffer.length(); char *result1=new char[size]; for(int i=0;i<buffer.length();i++) { result1[i]=buffer[i]; } file.close(); return result1; }[/CODE] code looks pretty normal right? but when I run it with the rest of the program this happens... [url]http://imageshack.us/photo/my-images/267/chararray0001.jpg/[/url] [url]http://imageshack.us/photo/my-images/28/chararray0002.jpg/[/url] [url]http://imageshack.us/photo/my-images/11/chararray0003.jpg/[/url] … |
The End.