A first visit to Borland C++ ============================= Start Borland C++ in the CUBE labs, like this: (Start>Borland Compilers>BorlandC++) Create a new project: File>New>Project Change "Project Path and Name" for your own folder (where project and everything else will be stored, say folder "assign1" and project name a1) Say: "h:\assign1\a1.ide" "Platform" should be set to "Win32" "Target Model" should be set to: "Console" Now you've got a side window with your: "a1.exe" and a few nodes hanging from it. Delete nodes "a1.def" and "a1.rc" by selecting "Delete node" for the menu that appears when clicking on the node. Double click on "a1.cpp" and type this simple program: ----------------------- #include main() { fstream f; f.xx ; // line with bug added on purpose f.open("myfirst.txt",ios::out); if (f.bad()) cerr<<"Error\n"; f<<"This is...\nmy brand new file\n"; f.close(); } ----------------------- Save it. Select Project>Make All Now, you can try to run this project. Select Debug>Run You you get a message: "Make failed" Press Ok. Now a message window with your compiling error appears at the bottom of the screen. Go back to "a1.cpp" and remove the line with the bug. Now, try to run again. You should be able to find your new file "myfirst.txt" at the same directory as your project, with the appropriate contents. --------------------------------------------------- Try to run projects with more than one file, by looking at the files available under: http://www.site.uottawa.ca/ftppub/courses/Fall/csi2172A/labs/