944,209 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 13314
  • C++ RSS
Jan 26th, 2007
0

C++: problam with data type(int,float,double)

Expand Post »
Hi everyone, I have a problam with data types which are using in C++. I am so confuce about int,float,double,strings,etc; And numbers of bits that related to each data type. Please anyone help me to solve my problam.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AshwinCareem is offline Offline
1 posts
since Jan 2007
Jan 26th, 2007
0

Re: C++: problam with data type(int,float,double)

Hi everyone, I have a problam with data types which are using in C++. I am so confuce about int,float,double,strings,etc; And numbers of bits that related to each data type. Please anyone help me to solve my problam.
The number of bits depend on the compiler. I'm sorry, but I really can't give a better answer without a more detailed question.
Reputation Points: 84
Solved Threads: 15
Posting Whiz in Training
Ravalon is offline Offline
209 posts
since Dec 2006
Jan 29th, 2007
0

Re: C++: problam with data type(int,float,double)

if we suppose you are using VC++ 7.0 or 8.0, ints and floats are often 32-bit, chars 8-bit, and doubles are usually 64-bit.

strings is not a base type.
Reputation Points: 20
Solved Threads: 2
Light Poster
VatooVatoo is offline Offline
39 posts
since Jan 2007
Jan 29th, 2007
0

Re: C++: problam with data type(int,float,double)

Write a program the outputs sizeof(type) to display the size of each type in bytes. Then multiply by 8 for bits.

For example sizeof(char) will probably output 1.
Moderator
Reputation Points: 3280
Solved Threads: 897
Posting Sage
WaltP is offline Offline
7,753 posts
since May 2006
Jan 29th, 2008
0

Re: C++: problam with data type(int,float,double)

Am very new to programming but what are these data types associated with, like

chars = letters such as a, b, c
strings = words such as boy, cat, jill
int = numbers such as 1 , 2, 3
double =?? does a double mean decimal numbers?
float = ?? does this mean larger decimal numbers?

srry am very new to this myself
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
orangejuice2005 is offline Offline
78 posts
since Jan 2008
Jan 30th, 2008
0

Re: C++: problam with data type(int,float,double)

Link .Scroll down to Fundamental data types.

Niek
Last edited by Nick Evan; Jan 30th, 2008 at 4:30 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: small c++ problem
Next Thread in C++ Forum Timeline: problem with win32 GUI.....please help me





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC