View Single Post
Old 07-07-2005, 08:57 AM   #2 (permalink)
Iron_Cross
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

When you define something you describe it. This mainly applies to functions, methods, classes, structs, though it can also apply to variables. When you declare something, you're basically saying, "Look here, I've got [X] which is of type [Y], so be forewarned!"

Example:

Declaration:
Code:
int i;
Definition:
Code:
i = 240;
See, when you declare something, you're kind of giving the compiler a fore-warning about that type. When you define something, you're actually giving it a value, and defining it.
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline