Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Memory Question?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Socket Programming (Unix) 8 142
No module found pypyodbc, 3 33
learn programming 8 41
How to add columns to a RAD Studio FMX grid at design time 1 4
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

837 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