24.9k views
3 votes
PLEASE HELP, PLEASE THIS C++ CODE WON'T WORK IDK WHY CFBundleDevelopmentRegion English CFBundleDisplayName DOSBox CFBundleExecutable DOSBox CFBundleGetInfoString 0.74-1, Copyright 2002-2012 The DOSBox Team CFBundleIconFile dosbox.icns CFBundleInfoDictionaryVersion 6.0 CFBundleName DOSBox CFBundlePackageType APPL CFBundleShortVersionString 0.74-1 CFBundleVersion 0.74-1 NSHumanReadableCopyright Copyright 2002-2012 The DOSBox Team NSPrincipalClass NSApplication CGDisableCoalescedUpdates

User Tvgriek
by
4.0k points

1 Answer

4 votes

Answer:

Step-by-step explanation:

There are such things as compiler bugs and even operating system bugs in which a program error-free itself fails to execute correctly.

For anyone including even the most experienced programmers, the overwhelming probability is that is not what is happening here.

There is only really one way to debug programs. Divide and conquer.

Enable all warnings in your compiler, find out what all the warnings mean, and drive them out or (not preferred) convince yourself that isn’t the problem

Keep trying to sub-divide the bit you think is wrong until you realize your error and fix it. If you come to the conclusion that bit is fine and the error exists earlier, but only exhibits at that point, change the program to test components in complete isolation.

If you come to a bit that you really can’t work out why it’s doing what it does, write a small standalone program that doesn’t do what you expect and post a question on Stack Overflow being clear about what you expect as the output and what you get.

Or

You didn’t write the correct instructions to reach your objective. It’s easy to write a program that nothing at all correctly and still compiles error-free. The compiler only spots the most glaring errors.

Hope this helps

User Roslan Amir
by
5.0k points