A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
What is the difference between #define and const?
On Monday, May 21st 2007 at 01:13 AM
By Andrew Pociu (View Profile)
(Rated 3.9 with 10 votes)
#define number 108
In this case every instance of "number" will be replaced by the actual number 108 in your code, and this means the final compiled program will have the number 108 (in binary).
On the other hand, when you use const and the application runs, memory is allocated for the constant and the value gets replaced when the applicaton is ran:
const int number = 108;
|Digg It! Del.icio.us Reddit StumbleIt Newsvine Furl BlinkList|
Rate this Knowledge Base article
Related Knowledge Base Articles
There are no related KB articles.
Related Source Code
There is no related code.
There are no related tutorials.
C++ Job Search
From the creators of Geekpedia, a revolutionary new coupon website!
BargainEZ has coupons codes, printable coupons, bargains and it is the leading source of Passbook coupons for iPhone and iPod touch devices.