Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Integrating a Library into a VC++ Project Pin
bigdenny2008-Nov-07 22:42
bigdenny2008-Nov-07 22:42 
QuestionAutomatic variable Pin
George_George8-Nov-07 22:07
George_George8-Nov-07 22:07 
AnswerRe: Automatic variable Pin
Rajasekharan Vengalil8-Nov-07 23:25
Rajasekharan Vengalil8-Nov-07 23:25 
GeneralRe: Automatic variable Pin
George_George9-Nov-07 2:35
George_George9-Nov-07 2:35 
GeneralRe: Automatic variable Pin
Rajasekharan Vengalil9-Nov-07 4:41
Rajasekharan Vengalil9-Nov-07 4:41 
GeneralRe: Automatic variable Pin
George_George9-Nov-07 21:18
George_George9-Nov-07 21:18 
GeneralRe: Automatic variable Pin
super_ttd16-Nov-07 6:13
super_ttd16-Nov-07 6:13 
AnswerRe: Automatic variable Pin
toxcct9-Nov-07 2:23
toxcct9-Nov-07 2:23 
a variable can be declared automatic, such as static or register.
automatic is the implicit type when you declare a variable without specifying this statement.

for information, register will ask the compiler (but not force it to) place the variable into a processor register. this is for a variable that is often modified, to improve performances.

static has several meaning. here, we do not talk about the static on class members.
delcaring a variable static means that its value pertains wether the execution goes out of scope. out of the scope, the variable is not destroyed (thus keeping its last value for the next time the code is reexecuted), but not much accessible from outside.

automatic simply means what we all know about variables lifetime. A variable is created at its declaration, is is release straight when going out of scope.

register double = 4.;    // delcared register, but the compiler might not put it in a register
 
static char c = 'B';     // static within its declaration scope
 
auto int i1 = 3;         // automatic variable. means, local to its scope

int i2 = -7;             // another automatic variable to the current scope



GeneralRe: Automatic variable Pin
George_George9-Nov-07 2:34
George_George9-Nov-07 2:34 
GeneralRe: Automatic variable Pin
toxcct9-Nov-07 2:35
toxcct9-Nov-07 2:35 
JokeRe: Automatic variable Pin
David Crow9-Nov-07 4:10
David Crow9-Nov-07 4:10 
JokeRe: Automatic variable Pin
Matthew Faithfull9-Nov-07 5:02
Matthew Faithfull9-Nov-07 5:02 
AnswerRe: Automatic variable Pin
David Crow9-Nov-07 4:12
David Crow9-Nov-07 4:12 
GeneralRe: Automatic variable Pin
George_George9-Nov-07 21:15
George_George9-Nov-07 21:15 
QuestionProblem associating document to application [modified] Pin
Nelek8-Nov-07 21:15
protectorNelek8-Nov-07 21:15 
QuestionLinearGradientMode equivalent in VC++ 6.0 Pin
Try8-Nov-07 21:06
Try8-Nov-07 21:06 
AnswerRe: LinearGradientMode equivalent in VC++ 6.0 Pin
Hamid_RT8-Nov-07 21:12
Hamid_RT8-Nov-07 21:12 
AnswerRe: LinearGradientMode equivalent in VC++ 6.0 Pin
Michael Dunn8-Nov-07 21:43
sitebuilderMichael Dunn8-Nov-07 21:43 
AnswerRe: LinearGradientMode equivalent in VC++ 6.0 Pin
Try8-Nov-07 22:07
Try8-Nov-07 22:07 
GeneralRe: LinearGradientMode equivalent in VC++ 6.0 Pin
bob169729-Nov-07 2:04
bob169729-Nov-07 2:04 
QuestionGetPrivateProfileSection Pin
rp_suman8-Nov-07 20:41
rp_suman8-Nov-07 20:41 
AnswerRe: GetPrivateProfileSection Pin
Hamid_RT8-Nov-07 21:13
Hamid_RT8-Nov-07 21:13 
AnswerRe: GetPrivateProfileSection Pin
CPallini8-Nov-07 21:21
mveCPallini8-Nov-07 21:21 
QuestionKnow loggedon user from a Service? Pin
SOAD_8-Nov-07 20:26
SOAD_8-Nov-07 20:26 
AnswerRe: Know loggedon user from a Service? Pin
Blake Miller16-Nov-07 5:10
Blake Miller16-Nov-07 5:10 

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.