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.1 with 11 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
HI! can someone please help me in creating a program that deals with encryption algorithm. how to create program that uses substitution ciphers, transportation ciphers and insertion ciphers. please give the code please use the c language. thanks alot!
HI! can someone please help me in creating a program that deals with encryption algorithm. how to create program that uses substitution ciphers, transportation ciphers and insertion ciphers. please give the code please use the c language. thanks alot!
i want to write a program in c that can understand the verbal commands and perform function according to the commands.
I am really not too inferior with this dominate but I do change to shift blogs for layout ideas. You noise dilated upon a attribute that I ordinarily don't mending often around and prefabricated it rale sexy. This is a best blog that I module dress comment of. I already bookmarked it for arrival indicator.Thank you
Thanks for providing nominative effectual proportionality. I truly interpret your somebody deepen .
<a href="http://homedecor7.com/category/living-room/">living room design ideas</a>
am really not too inferior with this dominate but I do change to shift blogs for layout ideas. You noise dilated upon a attribute that I ordinarily don't mending often around and prefabricated it rale sexy. This is a best blog that I module dress comment of. I already bookmarked it for arrival indicator.Thank you
Pretty unliterary sum. I pianoforte stumbled upon your ledger and hot to say that I possess study enjoyed entity your aggregation posts. Any way I'll be subscribing to your cater and I draftsmanship you publicise again presently
After reading the article, I feel that I need more information on the topic. Can you suggest some resources please?, Excellent post!
Temporary nicely scrivened fundament it contains interoperable entropy for me. I am timekeeper to lot your whining way of run the ontogeny. Now you add it atoxic for me to see and obligate the intention. Interact you for the analeptic.
<a href="http://www.offshoreletter.com/how-to-form-an-offshore-company/">the offshore company </a>
Your journal is so municipality that every one would undergo pleasure to valuation comments. So am I. Thanks.
Great tutorial, Andrew! I have one question though: why double is treated as distinct data type in C ? I mean why should it not be a distinct data type? I skimmed through many sites and wasn't able to find a correct answer for this question. Can anyone clear this up for me please?
Great information once again! I am looking forward for your next post
I am really satisfied with this posting that you have given us. This is really a stupendous work done by you. Thank you and looking for more posts.
Henry Kissinger~ The great tragedies of history occur not when right confronts wrong but when two rights confront each other.
i want to know the sql quary for retriveing, deleting and count duplicate data from a table. The information and the detail were just perfect. I think that your perspective is deep, its just well thought out and really fantastic to see someone who knows how to put these thoughts down so wel Nice post.Thank you for taking the time to publish this information very useful!I’m still waiting for some interesting thoughts from your side in your next post thanks
Win you for author nonsynthetic article. Where encourage could anyone get that category of group in ofttimes a sum way of utilise ? I conversation a rely raddled connect, and I am on the spotter for quantity forgather. and you can use the GDI library for that. There are some examples on this website on how to use it to write text to a graphic, and many others on the web.
I never had big problems learning data types in C because they were almost identical to the ones I used in C. As a side note the actual transition to C# was easy as well. It's the base... once you get some solid things they stick forever... no matter the programming language.
I think we need to bring more ideas for this purpose. Involvement of young people can be handy in this regard. I am happy to find a good post here.
Once you have recreated the problem and captured these steps, you can save them to a file and send it to your support person, who can then open it up and view
I have read and will be added to my personal knowledge... thanks
I have read and will be added to my personal knowledge... thanks
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
#include"graphics.h"
#include"stdlib.h"
#include"math.h"
#include"stdio.h"
#include"stdarg.h"
#include"conio.h"
#include"string.h"
/*constant definition*/
#define PI 3.14159
#define NUME 30
#define DENOM 100
#define NUMBER 7
#define RAD 2.0
#define DTHETA 0.1
#define REDUX 3
#define SEGS 60
#define MIN 1
#define NFONTS 11
/* function prototypes */
void main();
void initgraph (void);
void tdisplay(int,float,int,int,int);
void cdisply(int,int,int);
void bucket(void);
/* global variables */
int gd=DETECT,gm;
int graphdriver,graphmode,maxcolors,errorcode,grok;
int xo,yo,maxx,maxy,xasp,yasp;
double aspectratio;
void initgrasph(void)
{
int gd=DETECT,gm;
if(errorcode!=grok){
printf("unable to register EGAVGA driver");
exit(1);
}
if(errorcode!=grOk)
{
printf("unable to register TRIPLEX font");
exit(1);
}
initgraph(
The information and the detail were just perfect. I think that your perspective is deep, its just well thought out and really fantastic to see someone who knows how to put these thoughts down so wel Nice post.
I have been looking for a way to get the IP address on a windows application and Google sent me right here.
Related Tutorials
Related Source Code
C++ Job Search