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

C / C++ / MFC

 
QuestionCOnnecting UPS with PCS using Windows Management Ins Pin
abhiramsss19-Dec-05 17:58
abhiramsss19-Dec-05 17:58 
AnswerRe: COnnecting UPS with PCS using Windows Management Ins Pin
vikas amin19-Dec-05 20:04
vikas amin19-Dec-05 20:04 
QuestionHow to control word before print? Pin
sharkmouse19-Dec-05 17:48
sharkmouse19-Dec-05 17:48 
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 
hi all, i have a question about using global anonymous unions in more than one .cpp file.

if i have this code:
static union {int y; int z;};

in one of my source files, how do i declare it in a header file so it can be used elsewhere.

These approaches do not work:
extern static union {int y; int z;};<br />
extern union {int y; int z;};<br />
extern int y; extern int z;


If I take the 'static' off, i get the following message:
test.cpp(9) : error C2646: global anonymous unions must be declared static

But static means internal linkage, so does that mean this is impossible?

Thanks in advance,
John
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 
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 

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.