hello all,
I'm getting some unexpected behavior from the ifstream object when using the open method.
im reading the following characters from a text file:
###############
# #X# #
# ### # # ### #
# # # #
# # ## ## # #
# WWWW###WWWW #
# CWWWC #
#WWWWWWWWWWWWW#
# CWWWC #
# L WW WW L #
# # # #
# # # #
# ### # # ### #
#B #S# B#
###############
i'm using the following code to load the file.
ifstream file;
file.open( file_name.c_str(), ios::out, ios::binary );
when i debug my project and look at the buffer with the text visualizer i get the following result:
###############
# #X# #
# ### # # ### #
# # # #
# # ## ## # #
# WWWW###WWWW #
# CWWWC #
#WWWWWWWWWWWWW#
# CWWWC #
# L WW WW L #
# # # #
# # # #
# ### # # ### #
#B #S# B#
################
#B #S# B#
###############
mind the last 2 rows.
Can anyone tell me what i'm doing wrong?