Click here to Skip to main content
15,896,727 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to change the button style of Console Application Pin
IsaacLitingjun19-Dec-05 16:44
IsaacLitingjun19-Dec-05 16:44 
Questionblock popups Pin
neliocc19-Dec-05 16:42
neliocc19-Dec-05 16:42 
AnswerRe: block popups Pin
Owner drawn19-Dec-05 18:15
Owner drawn19-Dec-05 18:15 
QuestionQuestion about using MATLAB COM builder & VC++ Pin
QuangDien19-Dec-05 16:07
QuangDien19-Dec-05 16:07 
Questionglobal anonymous unions Pin
zildjohn0119-Dec-05 10:44
zildjohn0119-Dec-05 10:44 
AnswerRe: global anonymous unions Pin
vikas amin19-Dec-05 18:53
vikas amin19-Dec-05 18:53 
AnswerRe: global anonymous unions Pin
vikas amin19-Dec-05 20:03
vikas amin19-Dec-05 20:03 
NewsRe: global anonymous unions Pin
zildjohn0120-Dec-05 9:04
zildjohn0120-Dec-05 9:04 
the problem is i can only use one storage-class specifier, but static is required so i can't use extern. this current method works fine if i only need to access it through one source file, but my project has many source files and requires the members of this union to be accessed through many of those files. here is my current code, please post yours that works:

// main.h<br />
extern union {int y; int z;};<br />
<br />
// test.cpp<br />
#include "main.h"<br />
<br />
void do_something() {<br />
	y = z;<br />
}<br />
<br />
// main.cpp<br />
static union {int y; int z;};<br />
<br />
void main() {<br />
    do_something();<br />
}


i appreciate it,
John
AnswerRe: global anonymous unions [edited] Pin
toxcct19-Dec-05 21:38
toxcct19-Dec-05 21:38 
GeneralRe: global anonymous unions Pin
vikas amin19-Dec-05 22:01
vikas amin19-Dec-05 22:01 
GeneralRe: global anonymous unions Pin
Eytukan19-Dec-05 22:16
Eytukan19-Dec-05 22:16 
GeneralRe: global anonymous unions Pin
toxcct19-Dec-05 22:17
toxcct19-Dec-05 22:17 
GeneralOT Pin
Eytukan19-Dec-05 22:25
Eytukan19-Dec-05 22:25 
GeneralRe: OT Pin
toxcct19-Dec-05 22:41
toxcct19-Dec-05 22:41 
GeneralRe: OT Pin
ThatsAlok20-Dec-05 1:15
ThatsAlok20-Dec-05 1:15 
GeneralRe: OT Pin
vikas amin20-Dec-05 1:53
vikas amin20-Dec-05 1:53 
GeneralRe: OT Pin
Eytukan20-Dec-05 3:29
Eytukan20-Dec-05 3:29 
GeneralRe: OT Pin
Eytukan20-Dec-05 3:27
Eytukan20-Dec-05 3:27 
GeneralRe: OT Pin
ThatsAlok20-Dec-05 17:18
ThatsAlok20-Dec-05 17:18 
Questionwhere is the mistake. Pin
iiscodered19-Dec-05 8:18
iiscodered19-Dec-05 8:18 
AnswerRe: where is the mistake. Pin
Chris Meech19-Dec-05 8:47
Chris Meech19-Dec-05 8:47 
AnswerRe: where is the mistake. Pin
toxcct19-Dec-05 21:35
toxcct19-Dec-05 21:35 
AnswerRe: where is the mistake. Pin
Eytukan19-Dec-05 21:59
Eytukan19-Dec-05 21:59 
QuestionRe: where is the mistake. Pin
toxcct19-Dec-05 22:05
toxcct19-Dec-05 22:05 
AnswerRe: where is the mistake. Pin
Eytukan19-Dec-05 22:19
Eytukan19-Dec-05 22:19 

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.