CS1620 lab for Feb 1, 2007 0. Copy program from $L/ex/lawn.cc 1. Compile from command line -- note error messages 2. Compile from inside emacs. a. First time, do not type anything, just press enter key a. Next time, type "lawn.cc" to see what happens b. re-compile and erase the .cc 3. Error messages a. line 10 -- const must have a type -- make it double b. line 12 -- missing semi-colon on line 10 4. Re-compile (note it will ask to save) 5. Error messages a. line 17 -- did not include string 6. Re-compile 7. Error messages a. line 18 -- does not have using namespace std 8. Re-compile 9. Error-messages a. line 21 -- did not include iostream 10. Re-compile 11. Error messages a. line 26 -- used << instead of >> for input b. line 29 -- capital L in houselength and capital W in houseWidth 12. Re-compile 13. Error messages a. line 33 -- cost needs to be declared b. line 35 -- weekendCost needs to be declared 14. Re-compile 15. Error message a. line 40 -- should be endl not end 16. Re-compile Hip Hip Horray!!! no syntax errors 17. Run the program How come weekend cost is the same as weekday cost? (1/3) = 0; Should be (1.0/3.0) 18. Re-compile 19. Run it again. Yippee it works! 20. Re-compile to see what happens when the program is already compiled 21. Change const to 0.25 and re-compile and run to show the use of constants. 22. Go to beginning of file and type a 'y' - recompile to see the bizzare error message - remove the 'y' 23. exit emacs 24. cleanup a. rmtmp -- to get rid of temporary files b. rm lawn -- to get rid of executable