Click here to Skip to main content
15,921,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDirectX problem Pin
Selevercin18-Nov-02 11:19
Selevercin18-Nov-02 11:19 
GeneralRe: DirectX problem Pin
Paul M Watt18-Nov-02 13:29
mentorPaul M Watt18-Nov-02 13:29 
GeneralSubtle bug with static members... Pin
Jamie Hale18-Nov-02 10:54
Jamie Hale18-Nov-02 10:54 
GeneralRe: Subtle bug with static members... Pin
Christian Graus18-Nov-02 11:05
protectorChristian Graus18-Nov-02 11:05 
GeneralRe: Subtle bug with static members... Pin
Jamie Hale18-Nov-02 11:10
Jamie Hale18-Nov-02 11:10 
GeneralRe: Subtle bug with static members... Pin
Christian Graus19-Nov-02 10:08
protectorChristian Graus19-Nov-02 10:08 
GeneralRe: Subtle bug with static members... Pin
Jamie Hale18-Nov-02 11:05
Jamie Hale18-Nov-02 11:05 
GeneralRe: Subtle bug with static members... [corrected] Pin
Joaquín M López Muñoz18-Nov-02 11:06
Joaquín M López Muñoz18-Nov-02 11:06 
This is absolutely correct (I mean, it is pontentially broken as you suspected). In your particular case, chances are that you don't notice anything strange, as initialization of First::i can be done in compile time (i.e. the value 7 is directly stored in the executable). Try this for some more fun:
// First.h
class First {
	...
	static int i;
	static int j;
	...
};
// First.cpp
int First::i = 7;
int First::j = Second::q;
// Second.h
class Second {
	...
	static int q;
	static int r;
	...
};
// Second.cpp
int Second::q = First::i;
int Second::r = First::j;


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Subtle bug with static members... [corrected] Pin
Jamie Hale18-Nov-02 11:11
Jamie Hale18-Nov-02 11:11 
GeneralRe: Subtle bug with static members... [corrected] Pin
Joaquín M López Muñoz18-Nov-02 11:19
Joaquín M López Muñoz18-Nov-02 11:19 
GeneralMessagebox and Manifest Pin
S van Leent18-Nov-02 10:48
S van Leent18-Nov-02 10:48 
GeneralRe: Messagebox and Manifest Pin
EVILkos13-Dec-09 2:31
EVILkos13-Dec-09 2:31 
GeneralCustom shaped dialogs Pin
Dean Michaud18-Nov-02 10:18
Dean Michaud18-Nov-02 10:18 
GeneralRe: Custom shaped dialogs Pin
Navin18-Nov-02 10:34
Navin18-Nov-02 10:34 
GeneralRe: Custom shaped dialogs Pin
Dean Michaud18-Nov-02 10:45
Dean Michaud18-Nov-02 10:45 
GeneralRe: Custom shaped dialogs Pin
Michael Dunn18-Nov-02 11:18
sitebuilderMichael Dunn18-Nov-02 11:18 
GeneralRe: Custom shaped dialogs Pin
Atlantys19-Nov-02 3:07
Atlantys19-Nov-02 3:07 
GeneralAdding MFC to a non-MFC project Pin
Dave_18-Nov-02 10:03
Dave_18-Nov-02 10:03 
GeneralRe: Adding MFC to a non-MFC project Pin
Navin18-Nov-02 10:37
Navin18-Nov-02 10:37 
GeneralRe: Adding MFC to a non-MFC project Pin
Bill Wilson18-Nov-02 13:11
Bill Wilson18-Nov-02 13:11 
QuestionIs the field EMPTY ? Pin
Hadi Rezaee18-Nov-02 8:21
Hadi Rezaee18-Nov-02 8:21 
GeneralCListBox FindString Pin
Gary Kirkham18-Nov-02 8:17
Gary Kirkham18-Nov-02 8:17 
GeneralRe: CListBox FindString Pin
Gary Kirkham18-Nov-02 8:31
Gary Kirkham18-Nov-02 8:31 
GeneralFormatting string in Edit Box Pin
Georgi Atanasov18-Nov-02 6:49
Georgi Atanasov18-Nov-02 6:49 
GeneralRe: Formatting string in Edit Box Pin
Roger Allen18-Nov-02 7:21
Roger Allen18-Nov-02 7:21 

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.