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.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Understanding C++ data types IA small book for those beginners in C++ or even in programming who didn’t understand C++ data types. This is meant to be a patch to other books, that cover the basics of C++. Data types can be a little tricky sometimes, and difficult to understand, this book explains how data types work, and also shows you how to use them by giving examples. |
On Monday, March 1st 2004 at 09:09 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 3.2 with 10 votes) |
||
IntroductionBook’s purpose This is a short book for those beginners in C++ or even in programming who didn’t understand data types in C++. This book will only cover the C++ own types and will not teach you how you can create your own data types. There will be examples of how you should use data types and how you shouldn’t. This book is divided in separate parts, this is part 1. It will teach you C++ integers. Float will be covered in part 2 of this book. What you should know This book is for those who know the basics of C++. You can still learn data types from this book without knowing the basics of C++, but I recommend you to read a complete book first, and then, when you reach the data types lesson in that book, and after you read it, you read this short book too, to be sure you completely understand data types. What you should have I’m using Microsoft Windows XP as the operating system, and that means that this book applies only to Windows users, because data types differ in other operating systems like UNIX or Mac OS. You must have a compiler of course, and in this book, we use Visual C++ 6 Enterprise Edition. It makes a difference which compiler you are using, because data types often differ from one compiler to the other. What data types areData types Many programming languages use different data types. This data types can hold different values. There are some data types that can hold small values, and use less memory, and there are data types that can hold bigger values, but use much more memory. Adequate data type for adequate value There is no reason for you to store a small value in a big data type, because the space that it occupies in the computer memory is wasted. Let’s suppose you have a five characters word, like ‘aloha’, and the smallest data types you have can hold one character, five, or ten. Which should you use? Of course, if you can’t use the data type that holds one character because it has room to store only the first character, ‘a’. You can use the data type that holds ten characters, and the situation would look like this: ![]() Not very clever. You’re wasting five additional characters. The five characters that will remain empty will be reserved, because you declared 10 characters to be used. Therefore, the remaining 5 empty spaces cannot be used by another instance of a data type. It’s reserved for this data type instance only. On the other side, you can expand the word later, if you wish, to a maximum of 10 characters. For example, you can write ‘alohaaaa!’ and fill all the empty spaces. However, if you know this value doesn’t change why should you use the ten characters data type and not the five characters one? ![]() You save memory space and at the same time, your program gains performance. This was only an example to demonstrate you why data types are important. This is not a real-life example from C++. In the next lessons, we will work with more real-life examples. Now you can read 'Understanding C++ data types II' |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current Commentsi wwant to know abt some complete basic,and abt some programming.
regrads
Amna
Then try this:
http://www.geekpedia.com/prog_ttrls.php?id=11
http://www.geekpedia.com/prog_ttrls.php?id=12
http://www.geekpedia.com/prog_ttrls.php?id=13
parallel port programing
hi
i want to know how to program th parallel port using
c++ version 5.02 ?
i tryed the c programs but the compiler gives me major
error. please explaine why.
thank you.
i want to write a program in c language for transfering data from one computer to another computer using parallel port in printer port.
I want to write a program in C++ that reads data from a file whose name is input by the user, and that outputs the first word following each of the first three comma in the file.
me too
i want to know about datastuructures in c/c++
Seems like a great book, i hope I will like it!
hello
i want to learn how to programing for port programing using 'c' language.
Hi anyone, i'd really love to learn programming but i dont have the essential tutorial notes and the appropriate software, anyone willing to help with good heart...?
why are u muppets posting under data types? Parallel Port programming (is that for ur robot arm demo) should be under device slash hardware-interface programming... crickey!
PS. btw this first page of data-types is not well written, it\'s not that i don\'t appreciate the hard-work, but still.
Sorry just had to learn how to do this
Sorry just had to learn how to do this
i need information about Differend type of data in C
Related Tutorials
Related Source Code
C++ Job Search