Click here to Skip to main content
15,885,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The Serical Port Question? Pin
Erudite_Eric11-Jul-13 20:59
Erudite_Eric11-Jul-13 20:59 
GeneralRe: The Serical Port Question? Pin
dave62112712-Jul-13 5:35
dave62112712-Jul-13 5:35 
QuestionCompile error caused from big header file Pin
andreas049-Jul-13 22:02
andreas049-Jul-13 22:02 
AnswerRe: Compile error caused from big header file Pin
Richard MacCutchan10-Jul-13 1:33
mveRichard MacCutchan10-Jul-13 1:33 
AnswerRe: Compile error caused from big header file Pin
Erudite_Eric10-Jul-13 2:19
Erudite_Eric10-Jul-13 2:19 
QuestionRe: Compile error caused from big header file Pin
David Crow10-Jul-13 6:17
David Crow10-Jul-13 6:17 
AnswerRe: Compile error caused from big header file Pin
Erudite_Eric10-Jul-13 23:12
Erudite_Eric10-Jul-13 23:12 
GeneralRe: Compile error caused from big header file Pin
leon de boer13-Aug-13 9:28
leon de boer13-Aug-13 9:28 
Sorry that is not true at all and all very misleading by everyone.

Visual studio follows a generic normal

What will happen with "static" depends on if they are initialized to zero or not.

Zero initialized static data goes in .BSS segment
initialized static data goes into the Data segment

You can however override all this in Visual Studio and move the data around using the #pragma directive

http://msdn.microsoft.com/en-us/library/azbwewbt.aspx[^]

C++
// pragma_directive_bss_seg.cpp
int i;                     // stored in .bss
#pragma bss_seg(".my_data1")
int j;                     // stored in "my_data1"

#pragma bss_seg(push, stack1, ".my_data2")   
int l;                     // stored in "my_data2"

#pragma bss_seg(pop, stack1)   // pop stack1 from stack
int m;                     // stored in "stack_data1"

int main() {
}



"const" go in the const_seg

http://msdn.microsoft.com/en-us/library/1dc22465.aspx[^]

C++
const int i = 7;               // inlined, not stored in .rdata
const char sz1[]= "test1";     // stored in .rdata

#pragma const_seg(".my_data1")
const char sz2[]= "test2";     // stored in .my_data1

#pragma const_seg(push, stack1, ".my_data2")
const char sz3[]= "test3";     // stored in .my_data2

#pragma const_seg(pop, stack1) // pop stack1 from stack
const char sz4[]= "test4";     // stored in .my_data1

Questionhow to get hard drive serial number using c++ Pin
Heya from Delhi9-Jul-13 18:51
Heya from Delhi9-Jul-13 18:51 
AnswerRe: how to get hard drive serial number using c++ Pin
«_Superman_»9-Jul-13 20:37
professional«_Superman_»9-Jul-13 20:37 
Question[SOLVED] GetScanline is not a member of TBitmapData??? Pin
PickRelated8-Jul-13 23:14
PickRelated8-Jul-13 23:14 
AnswerRe: GetScanline is not a member of TBitmapData??? Pin
Richard MacCutchan8-Jul-13 23:21
mveRichard MacCutchan8-Jul-13 23:21 
GeneralRe: GetScanline is not a member of TBitmapData??? Pin
PickRelated8-Jul-13 23:35
PickRelated8-Jul-13 23:35 
GeneralRe: GetScanline is not a member of TBitmapData??? Pin
PickRelated8-Jul-13 23:41
PickRelated8-Jul-13 23:41 
GeneralRe: GetScanline is not a member of TBitmapData??? Pin
Richard MacCutchan9-Jul-13 0:07
mveRichard MacCutchan9-Jul-13 0:07 
GeneralRe: GetScanline is not a member of TBitmapData??? Pin
PickRelated9-Jul-13 1:38
PickRelated9-Jul-13 1:38 
QuestionHow to edit metadata of a wmv file in c++ Pin
Member 78368298-Jul-13 22:39
Member 78368298-Jul-13 22:39 
AnswerRe: How to edit metadata of a wmv file in c++ Pin
Richard MacCutchan8-Jul-13 23:15
mveRichard MacCutchan8-Jul-13 23:15 
QuestionAccess Deined Pin
sarfaraznawaz8-Jul-13 20:15
sarfaraznawaz8-Jul-13 20:15 
AnswerRe: Access Deined Pin
Jochen Arndt8-Jul-13 21:00
professionalJochen Arndt8-Jul-13 21:00 
AnswerRe: Access Deined Pin
Erudite_Eric10-Jul-13 2:16
Erudite_Eric10-Jul-13 2:16 
QuestionWhich event generated on SetItemtext in CLitsCtrl? Pin
Le@rner8-Jul-13 19:45
Le@rner8-Jul-13 19:45 
AnswerRe: Which event generated on SetItemtext in CLitsCtrl? Pin
«_Superman_»8-Jul-13 20:09
professional«_Superman_»8-Jul-13 20:09 
GeneralRe: Which event generated on SetItemtext in CLitsCtrl? Pin
Le@rner8-Jul-13 20:15
Le@rner8-Jul-13 20:15 
GeneralRe: Which event generated on SetItemtext in CLitsCtrl? Pin
«_Superman_»8-Jul-13 20:28
professional«_Superman_»8-Jul-13 20:28 

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.