?
Solved

Memory Question?

Posted on 1998-09-12
1
Medium Priority
?
249 Views
Last Modified: 2010-05-18
Hi. I have two questions, really.
First of all: When I use sizeof, of elementary types, such as sizeof(short) : Is it done on-line or is the size calculated at compile time?
Second : Is it really useful to use short/char and such type to save space, or is everything 32 bit under windows95?
thanks!

   Ron (Who is using VC++ for this, under win95)
0
Comment
Question by:ShadowHawk071998
1 Comment
 
LVL 5

Accepted Solution

by:
yonat earned 100 total points
ID: 1172582
1. The calculation is done at compile time.
2. Usually not. The compiler may pad it to 32 bit anyway, and if doesn't there may be a performence penalty.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question