Welcome to Dream.In.Code
Become an Expert!

Join 150,027 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,565 people online right now. Registration is fast and FREE... Join Now!




Defenitions

 
Reply to this topicStart new topic

Defenitions

HeadShot
2 Jun, 2008 - 09:29 PM
Post #1

New D.I.C Head
*

Joined: 1 Jun, 2008
Posts: 37


My Contributions
I'm trying to describe some programming concepts to a friend, but he really isn't getting the idea, so can any of you come up with a good explanation for some concepts? Not to simple, but not to advanced. In between I guess. Anyone?

Library
Compiler (I said: something that will run your code.)
C++ Iostream
Compiling (I said: mixing your code together into a program that runs)

And any other confusing program things you can think of, thanks!
User is offlineProfile CardPM
+Quote Post

.Maleficus.
RE: Defenitions
3 Jun, 2008 - 04:26 AM
Post #2

D.I.C Head
**

Joined: 7 Mar, 2008
Posts: 127



Thanked: 2 times
My Contributions
Library: A set of classes (think of books in a library). If you think of it in terms of a game engine, it contains classes (books) on all subject matter for the games; graphics, sound, input, etc. You can write you own library (say, a library with all the needed stuff to build a game) or download other libraries that have already been made. It's used as a time saving thing; if you don't need to write a class (because you can find a library with the specs you need) then why would you?

Compiler: When you write code, it isn't what a computer "reads". It's what the compiler reads. The compiler looks at what you wrote, sees int main() and says, "Oh look, there's the main function. Time to compile that into computer byte-code!" It then takes the code you've written and makes computer-readable byte code (machine language).

<iostream>: I/O (capital i, capital o) stands for Input/Output. C++'s <iostream> is a class that allows basic input/output in your programs. ie, it allows you to use cin, cout, cerr, clog.

Compiling: Again, taking human-readable code and making it byte-code. In a C++ program, after compiling comes linking, where the program is mashed together with all of the necessary classes and/or libraries. After linking comes building, where you actually make an executable program that you can distribute.

And I'll add...

Class: Classes are the objects in OOP (object-oriented programming). They are independent of each other, allowing greater flexibility in your programming. They are build with a specific thought in mind. Think of them as real world objects (lets use a bike). Here's a class diagram of a bike object.
CODE
class Bike
rideBike() - Function (action) for riding the bike
steerBike() - Function to control your steering
brake() - Brake!
sqeezeHorn() - All good bikes have a squeezable horn, right?  You need a function to make it honk
numOfWheels - Property for how many wheels it has.  Is it a bicycle, tricycle, etc.
hasGears - Boolean property (true or false) for having gears
numOfGears - Number of gears the bike has

You get the idea. You then construct the bike (in Java it would be): Bike bike = new Bike() and then use the newly created bike. Say you want to ride the bike. bike.rideBike()

This post has been edited by .Maleficus.: 3 Jun, 2008 - 04:38 AM
User is offlineProfile CardPM
+Quote Post

HeadShot
RE: Defenitions
3 Jun, 2008 - 06:25 AM
Post #3

New D.I.C Head
*

Joined: 1 Jun, 2008
Posts: 37


My Contributions
Thanks for the help!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:30PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month