Wednesday, April 25, 2012

Final script updates for ultimate laziness...

So, here is now my new, and most recent, "cal" batch script and the new "execute program" batch script:

File contents of "cal.bat":
 @echo off   
 echo Compiling and linking the C++ source code,  
 echo and preparing the executable for debugging...  
 g++.exe -Wall -g -o executable SourceCode.cpp  
 pause  

File contents of "execute program.bat":
 @echo off  
 executable.exe  
 pause  


PS: The little "pause" command at the end of each file freezes the Command Prompt window until I press any key, which makes me able to see the contents of the window without it automatically closing right after the compilation or the execution of the program was complete...


Let the double-click heaven begin!!

ideone.com - Best. Site. Ever.

First I got rid of linux by installing MinGW and MS Visual Studio Express, and now I'm basically getting rid of my whole computer as long as I have a device I can type stuff into a website. I don't need a computer at all to test my programs! ideone.com rocks.

PS: For some reason I feel like making and advertising right now...

Sunday, April 22, 2012

Back in buisness...

I know, I know, I've been awfully lazy lately. I just wish I had a huge break by now. I still don't want to do anything at all, but I don't want a bad grade either. Well, here's some stuff I've written down a bit in my notebook. Here is a list of what has been defined in class so far and in which directive they reside so that every time I start programming, if I need to look down something to see where it was defined, I can just take a look at this list and include the directive I need in my source code. I still need to update some of it though.

I. List of primitive types:
    This list should be enough.


II. List objects, operators and member functions from <iostream>:


Objects:

  1. cout
  2. cin
Operators:
  1. >> - extraction operator
  2. <<  - insertion operator
Member funcions:
  1. setf(... :: ...)
  2. precision(n)


III. List of classes, operators and member functions from <fstream>:


Classes:

  1. ifstream
  2. ofstream
Operators:
  1. >> - extraction operator
  2. <<  - insertion operator
Member funcions:
  1. setf(... :: ...)
  2. precision(n)


IV. List of manipulators from <iomanip>
  1. setw(n)
  2. setprecision(n)
V. List of functions from <cctype>
  1. toupper(char_variable) - Returns an int value
  2. tolower(char_variable) - Returns an int value
  3. isupper(char_variable) - Returns a boolean vaue
  4. islower(char_variable) - Returns a boolean value
  5. isalpha(char_variable) - Returns a boolean value
  6. isdigit(char_variable) - Returns a boolean value
  7. isspace(char_variable) - Returns a boolean value
------------End of List-------------

Those are basically the lists. I'll probably be updating those so that I just have to search within this text in order to find what I need to include in my source code. Oh, and before I forget, I need to write these couple of important sentences down:

  1. Every Variable is an Object, but not every Object is a Variable (i.e. the objects are a proper subset of the variables).
  2. Every Type is a Class, but not every Class is a Type. (i.e. the classes are a proper subset of the types.)
  3. An object is an element of a Class.
  4. A variable is an element of a Type that is not a Class.
I think that will be it for this post...


Edit (April 25): I think I'm missing a list...