Corning Community College C/C++ Programming Assignments, Documents, Information, and Projects ======Week 13====== * The full EoCE has been released, check your Opus for details (if you don't see it, you're not logged in). * Last new thing: [[cprogtemplates|C++ Templates]] ======Week 12====== * Time for some polymorphism. Sample code time. * **mkdir -p ~/src/cprog/polymorphism** * **cd /var/public/cprog/polymorphism** * **cp /var/public/cprog/polymorphism/account.cc ~/src/cprog/polymorphism** * **cd ~/src/cprog/polymorphism** * Some End of Course Experience programs: * [[cprogeoce1|Reproduce this logic]] * [[cprogeoce2|Selection Conversion]] ======Week 11====== * The next venue of exploration will be inheritance. There is some sample code we'll walk through. * **cd /var/public/oop/inheritance/** * **make copy** * **cd** * **cd src/cprog/inheritance** ======Week 10====== * Because you've all been so awesome, I'm giving you next week off from all your scheduled classes. You're welcome. * More GD fun, integrating with our existing C knowledge. * Polygons: [[gdpoly|Make a triangle]] * Perhaps we'll start talking about classes today... * Basic Classes (Classes are really just structs with added fluff): [[cppclass1|Simple Classes]] ======Week 9====== * Going to start putting everything together and learning to use libraries. * First up: [[sqrtprog|The Math Library]] * Then: [[gdintro|The GD Library]] * Just in case there happens to be a sing-a-long, some [[structslyrics|lyrics]] * More GD fun is upon us! * Shapes fun: [[gdcircle|Circle of Squares]] ======Week 8====== * I had a request for a deeper exploration of object file linking (during the compilation process). At the same time, I thought it would be a good opportunity to start looking at file processing (reading in data from a text file). I have implemented an example which will copy itself into your **~/src/cprog/scores/** directory; to get it, simply do the following (on lab46): * **cd /var/public/cprog/multifile/scores/** * **make copy** * **cd ~/src/cprog/scores/** * To compile (eventually we'll want to do this for **EACH** source file: * **gcc -c main.c** * **gcc -c iscores.c** * **gcc -c fscores.c** * **gcc -c display.c** * **gcc -o scores main.o iscores.o fscores.o display.o** (do this just once, after compiling each **.c** file to a **.o** file). * Setting up for structs: [[prestructs|prestructs]]. * Converting to use structs: [[structs1|structs1]]. ======Week 7====== * Warning Grades were submitted. You received one if you met one of these criteria: * (1F) No/shockingly little modification to your opus * (1D) Opus content/modifications, but far too little, or far too long since last update. * The situation is easy to fix, just keep your Opus updated and filled with relevant content. Some people in the class have an EXCELLENT Opus. * We're going to start exploring functions and multi-file programs. I have implemented an example which will copy itself into your **~/src/cprog/exponentiator/** directory; to get it, simply do the following (on lab46): * **cd /var/public/cprog/multifile/exponentiator/** * **make copy** * **cd ~/src/cprog/exponentiator/** * To compile (eventually we'll want to do this for **EACH** source file: * **gcc -c main.c** * **gcc -o exponentiator *.o** (do this just once, after compiling each .c file to a .o file). ======Week 6====== * Playing with [[random_numbers|Random Numbers]]. ======Week 5====== * Getting input a [[fgetc_input|byte at a time with fgetc()]]. * Array and input fun: [[pointer_arrays_char_input|mixing char input and arrays to get strings]]. * Probably will start on **if** statements, decision making, and relational operators. ======Week 4====== * More pointer fun: [[pointer_array|arrays as pointers]]. * Getting input via [[scanf_input|formatted text strings in scanf()]]. ======Week 3====== * Hopefully we have all finished the data types/ranges program. * We'll be moving on to exploring the following programs: * A program that looks at [[character_data|why chars might be called chars and not short short ints]]. * A program that [[pointer_fun1|plays a bit more with memory]]. * A program that [[pointer_fun2|digs a little deeper with memory]]. * Before we get too far into this, please be sure to watch [[http://cslibrary.stanford.edu/104/|Pointer Fun with Binky (C version)]] * Be sure to be regularly updating your journal! * Think of things you do not yet understand related to C-- consider researching them or asking questions. And any such knowledge gained? Perfect for going on your journal! ======Week 2====== * Try out address/content code * Find ranges and sizes for the following data types: * unsigned char * signed char * unsigned short int * signed short int * unsigned int * signed int * unsigned long int * signed long int * unsigned long long int * signed long long int * Example code for both the chars can be found [[datatyperanges|here]]. ======Week 1====== * Set up screen + irssi to get on the class chat. * Type in, compile, and study the **Hello, World!** example. * Set up Personal Lab46 Mercurial Repository * Type in, compile, and study the first data type example code.