From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Borthwick To: egcs@cygnus.com Subject: bool Date: Tue, 11 Nov 1997 08:27:00 -0000 Message-id: X-SW-Source: 1997-11/msg00407.html Hi, I'm looking for some advice on boolean variables in g++. I wrote a little test program and found that with the 1997/11/05 snapshot, a bool has a size of 4 bytes. While I recognize that this is not a valid comparison because of the use of pointers, I found that "sizeof(vector)" gives a size of 28 bytes as did "sizeof(bit_vector)". My questions, then are, --Am I better off using vector or bit_vector if I want a vector of booleans? --Am I correct that if space is a concern, I am better off using a "char" than a "bool" because the former takes one byte and the latter takes four? Thanks, Andrew Borthwick