Solved

Memory Question?

Posted on 1998-09-12
1
231 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 50 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

786 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