CS 2073, Engineering Programming
Questions and Answers, Fall 2005

  1. Question (Wed Aug 31 19:07:02 CDT 2005): I have been trying and trying to run the C program in microsoft visual studio.net but if I create a c++ file , even if I save it, the option of Build doesnt seem to appear in the upper bar menu. I also tried to start a C++ project but there are many options of C++ projects to choose from. After trying some of them the program would let me build and compile but then it will tell me that there is a fatal error... I also went to different computer labs to try to find computers with Visual Studio 6.0 or the bloodshed but I didn't find any. Can someone verify the right procedure of how to do it in Visual Studio.net..

    Answer: You can use the computers in SB 1.02.04 (Science Building), and they have Visual Studio 6.0. They are the ones I used to try out the software for the course. When I get a chance, I'll see if I can find a Visual Studio.net to try out. The "bloodshed" program on the computers uses a link called "Dev-C++" or some such. Anyway, for now the fix is to use SB 1.02.04 if all else fails.


  2. Question (Tue Sep 6 22:04:58 CDT 2005): I downloaded the Bloodshed.net compiler, and I tried to do what you wrote on the board to keep the black box from disappearing. Could you send me the instructions again?

    Answer: Sure. You need a "scanf" statement (or something like it) at the end of your program, so that at the end of your the run, everything will pause while it waits for you to enter data. The method I showed in class looked like the following, where you add the stuff in red below.


  3. Question (Fri Sep 30 10:45:10 CDT 2005): For use in Program 5, the sample random number program at the start of Random Numbers produces an error in Visual Studion C++ 6.0.

    Answer:Yeah, sorry. In Visual Studion you need to have the extra include #include <time.h> at the start. I have it now in the sample program.


  4. Question (Fri Oct 14 14:27:58 CDT 2005): I added some code which is supposed to sort my output, but it is not working, please help. Thank you.

    Answer: I believe your only mistake is that you did not call your sort function. From within the main function, after the loop to read and print, you could place your sort funtion in the form sort(s, n); However, you are not allowed to use this method. Instead you must follow the directions and insert each new number in the proper (sorted) location as you read the numbers.