Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A strange thing happing when executing my program

Status
Not open for further replies.

psnead

Programmer
Jul 5, 2000
41
DK
I am writing a program that reads information from a file line by line.&nbsp;&nbsp;When I run the program from the DOS shell, one thing happens, and when I run the program from Visual C++ using the Execute button on the build pull-down menu another thing happens.&nbsp;&nbsp;Does anyone know why this may happen?<br>
 
My program reads data from a text file.&nbsp;&nbsp;The text file is a file off of the VAX OS, so it contains all sorts of form feed characters etc. My program looks for tokens in each line of the file, however, if there is a form feed character, ascii character 12, it is programed to skip that line.&nbsp;&nbsp;When I run the program from the Visual C++ build menu, it doesn't skip these lines in the file.&nbsp;&nbsp;When I run it from the DOS shell it does skip the lines containing the form feed character.&nbsp;&nbsp;This just seems really strange to me.&nbsp;&nbsp;I wrote a little patch so that it works both places, but I just want to know why for my own good.
 
Huuuuuu.<br><br>I'm not a expert in Visual C++. Maybe you can try to execute your programm (not patched version) through start-&gt;execute to see if it's a difference between a windows and a dos execution, or between a executing under visual and not under visual.<br><br>Sometime also, you can observe strange behavior of multi-threaded programms during debugging. Does the bug occurs both in debug and release compilations ?<br><br>David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top