I made a c++ program but my teacher rejected it because i had used goto function everywhere. she told me that i can use do while instead. so i started replacing goto with do while. after spending so many hours on my desktop when i tried to run it , i got an error ,so strange that i do not even know where the error is as turbo c is not telling where it is .
it says
X#=0D,CS=0A97 IP=000001D1.The NTVDM CPU has encountered an unhandled exception .
plz somebody help me fast . i have spent more than required time on this project and am ending up nowhere. i have to finish it up fast as i have to study for my 12th final exams.

before do while (with goto function) ---working as i desire
http://www.4shared.com/file/0N3_4w4M/_comp_shop_2.html

after do while
http://www.4shared.com/file/Pl5xwxEU/_comp_shop.html

please help me.... Thanks in advance

You should post the code either directly on DaniWeb (using code tags) or on something like http://codepad.org/ .

And your teacher was right - you shouldn't use goto :)

David

Hi,

Even though daviddoria is right (you should post your code on the forum), I understand that you´re in some difficulties, since you´re program is unusually unstructured (I had a quick look at the source code). It would take days for me to find an unidentified error in your code. Therefore I suggest that you start with structuring your code - shortening it down and dividing it into modules.

However, I noticed one thing I´d immediately change - use int instead of void as return value for the main function. Not all compilers support a void return value for the main function - as it´s not in the standard.

Cheers,
Erik

thank you for the quick reply everyone..but the problem is that i hav to study now ...cant give any more time to this.....dont give much time but plz give a look to it ...and suggest me how can this error come...am not even aware of it..........

commented: How is this our problem? -1

1) Please use real English words - I.e. "please" instead of "plz".

2) You should be able to produce these same errors with about 10 lines of code, we do not want to look at 1200!!

3) These missing header files means your system either does not have those files or your include paths are not setup properly. Which compiler/operating system/IDE are you using?

thank god it is runing at last..........after removing and manupulating whole progrm i ws not even able to compile this not even once. the problem was that i was making the changes on that cpp which i placed in c:\ and i dont know may be because of security reson it didnt run from there.......
and now as it is runing it had not a single error ..thank god....thanks everyone .....problem solved

Please mark the thread as solved.