Click here to Skip to main content
15,898,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: program won't rune in NT or XP Pin
Michael Dunn28-Feb-04 16:31
sitebuilderMichael Dunn28-Feb-04 16:31 
Questionhow to create .pdf file. Pin
Xiaodi_Liu27-Feb-04 18:52
Xiaodi_Liu27-Feb-04 18:52 
AnswerRe: how to create .pdf file. Pin
calebcohoon29-Feb-04 18:45
calebcohoon29-Feb-04 18:45 
Questioninterviewee question??? Pin
Balkrishna Talele27-Feb-04 17:25
Balkrishna Talele27-Feb-04 17:25 
AnswerRe: interviewee question??? Pin
Prakash Nadar27-Feb-04 18:34
Prakash Nadar27-Feb-04 18:34 
GeneralRe: interviewee question??? Pin
Balkrishna Talele2-Mar-04 17:34
Balkrishna Talele2-Mar-04 17:34 
GeneralRe: interviewee question??? Pin
Prakash Nadar2-Mar-04 18:14
Prakash Nadar2-Mar-04 18:14 
AnswerRe: interviewee question??? Pin
Gary R. Wheeler28-Feb-04 7:28
Gary R. Wheeler28-Feb-04 7:28 
The answer depends on the scope where the variables are defined. If the variables are defined at file scope, i.e. outside of any function definition, then their storage is global, like this:
int a=5;
int &b=a;

void Function()
{
    // ...
};
'Global' variables are constructed by the C++ runtime when program execution begins.

If the variables are defined within a function (hence they have function scope), like this:
void Function()
{
    int a=5;
    int &b=a;
    // ...
};
then they are allocated on the stack.

The fact that the variable b is a reference shouldn't alarm you. It is still an ordinary variable.


Software Zen: delete this;
GeneralRe: interviewee question??? Pin
Balkrishna Talele2-Mar-04 17:32
Balkrishna Talele2-Mar-04 17:32 
GeneralRe: interviewee question??? Pin
Gary R. Wheeler3-Mar-04 12:56
Gary R. Wheeler3-Mar-04 12:56 
GeneralRe: interviewee question??? Pin
Balkrishna Talele3-Mar-04 16:33
Balkrishna Talele3-Mar-04 16:33 
GeneralRe: interviewee question??? Pin
Gary R. Wheeler4-Mar-04 12:07
Gary R. Wheeler4-Mar-04 12:07 
General"Fid dialog box" but application independent Pin
Jahangi Jamshed27-Feb-04 17:10
sussJahangi Jamshed27-Feb-04 17:10 
GeneralRe: "Fid dialog box" but application independent Pin
Balkrishna Talele2-Mar-04 17:40
Balkrishna Talele2-Mar-04 17:40 
GeneralVisual C++ Macros Pin
Archer28227-Feb-04 14:04
Archer28227-Feb-04 14:04 
GeneralRe: Visual C++ Macros Pin
Prakash Nadar27-Feb-04 14:21
Prakash Nadar27-Feb-04 14:21 
GeneralRe: Visual C++ Macros Pin
Archer28228-Feb-04 7:04
Archer28228-Feb-04 7:04 
GeneralRe: Visual C++ Macros Pin
Prakash Nadar28-Feb-04 17:16
Prakash Nadar28-Feb-04 17:16 
QuestionLinker error??? Pin
alex.barylski27-Feb-04 11:33
alex.barylski27-Feb-04 11:33 
AnswerRe: Linker error??? Pin
Neville Franks27-Feb-04 11:36
Neville Franks27-Feb-04 11:36 
GeneralRe: Linker error??? Pin
alex.barylski27-Feb-04 11:42
alex.barylski27-Feb-04 11:42 
GeneralRe: Linker error??? Pin
alex.barylski27-Feb-04 11:45
alex.barylski27-Feb-04 11:45 
GeneralRe: Linker error??? Pin
Neville Franks27-Feb-04 11:50
Neville Franks27-Feb-04 11:50 
GeneralWord file format Pin
alex.barylski27-Feb-04 11:16
alex.barylski27-Feb-04 11:16 
GeneralRe: Word file format Pin
Prakash Nadar27-Feb-04 14:24
Prakash Nadar27-Feb-04 14:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.