Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > char 8bit wide or 7bit wide in c++?

Reply
Thread Tools

char 8bit wide or 7bit wide in c++?

 
 
Web Developer
Guest
Posts: n/a
 
      07-31-2003
Hi,

Have a book that says a char in c++ is 8bit wide. But i remember reading
that C++ uses ANSI character set which uses 7bit per character. Who is
right?


WD


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003


 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      07-31-2003

"Web Developer" <(E-Mail Removed)> wrote in message
news:3f28c7ab$(E-Mail Removed)...
> Hi,
>
> Have a book that says a char in c++ is 8bit wide. But i remember reading
> that C++ uses ANSI character set which uses 7bit per character. Who is
> right?
>


Neither. In fact every statement about C++ above is wrong. Here's the truth.

In C++ a byte must be at least 8 bits. A char must be a single byte.

C++ does not use the ANSI character set (maybe you mean ASCII?), it might,
but it does not have to, it could use a completely different character set.

Even if C++ did use a seven bit character set, then it would do so in a
eight bit character (probably) and just ignore the extra bit.

john


 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      07-31-2003

"John Harrison" <(E-Mail Removed)> wrote in message
news:bgaima$mkb10$(E-Mail Removed)-berlin.de...
>
> "Web Developer" <(E-Mail Removed)> wrote in message
> news:3f28c7ab$(E-Mail Removed)...
> > Hi,
> >
> > Have a book that says a char in c++ is 8bit wide. But i remember reading
> > that C++ uses ANSI character set which uses 7bit per character. Who is
> > right?
> >

>
> Neither. In fact every statement about C++ above is wrong. Here's the

truth.
>


What's the book BTW?

john


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
8bit * 8bit pipelined multiplier humble VHDL 0 10-28-2006 06:16 PM
(const char *cp) and (char *p) are consistent type, (const char **cpp) and (char **pp) are not consistent lovecreatesbeauty C Programming 1 05-09-2006 08:01 AM
/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre silverburgh.meryl@gmail.com C++ 3 03-09-2006 12:14 AM
7bit to 8bit Daniel Roth Python 3 04-15-2004 02:09 PM
8bit to 7bit numbers marko Perl 0 08-23-2003 10:50 AM



Advertisments