Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Alignment in C++

Reply
Thread Tools

Alignment in C++

 
 
puzzlecracker
Guest
Posts: n/a
 
      01-14-2005
I wasn't as to how pertinent this section is for the following
question, but I did receive this question in some relation to C++. In
addition, I couldn't find a better fitting section for the question
(please direct me to the proper section although I would HIGHLY
APPRECIATE IF SOMEONE CAN ANSWER OR GIVE POINTERS TO where I CAN GET
THE ANSWER AND UNDERLINING EXPLANATION, for this is prime, favorite and
trustworthy group).

Here it goes:

What are the alignment rules for 16, 32, 64 bit machine - would
certainly appreciate a down-to-earth, comprehensive reference? For
example, what is the layout for these examples?
a)

Code:
struct
{
short int a;
int b;
};



b)
Code:
struct{
short int a;
int b;
int somefunc();
virtual int func1();
};

c) Very Tricky (Hint: it is tricky with virtual function (or should I
say pointers to vtable...you should know something about vtables in
last but clever case))

Code:
struct{
short int a;
int b;
virtual int func_1();
virtual int func_2();
:
:
virtual int func_n();
};



And lastly, is there a group for algorithms particularly a riddle type,
(problems - such as to find a largest subarray in array of positive and
negative integers, or contests type)... also where a somewhat decent
analysis of algorithms takes place... thanks a million!!!!

 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      01-14-2005
* puzzlecracker:
> [homework]


We don't do homework; check the FAQ.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
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
Regd---Justify option in Alignment. =?Utf-8?B?bWFudQ==?= ASP .Net 0 09-23-2005 07:35 AM
Phase alignment ALuPin VHDL 0 05-17-2004 09:12 AM
Closing a browser, crystal report viewer alignment Anne ASP .Net 0 07-30-2003 02:49 PM
Crystal Reports Viewer alignment Anne ASP .Net 0 07-29-2003 03:34 PM
Re: Help required for alignment problem Sunil Menon ASP .Net 0 06-26-2003 07:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57