Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionstatic const int inside class Pin
vikramlinux17-Jul-06 22:15
vikramlinux17-Jul-06 22:15 
AnswerRe: static const int inside class Pin
toxcct17-Jul-06 23:52
toxcct17-Jul-06 23:52 
GeneralRe: static const int inside class Pin
vikramlinux17-Jul-06 23:55
vikramlinux17-Jul-06 23:55 
GeneralRe: static const int inside class Pin
toxcct17-Jul-06 23:59
toxcct17-Jul-06 23:59 
GeneralRe: static const int inside class Pin
Maxwell Chen18-Jul-06 0:03
Maxwell Chen18-Jul-06 0:03 
GeneralRe: static const int inside class Pin
toxcct18-Jul-06 0:06
toxcct18-Jul-06 0:06 
GeneralRe: static const int inside class Pin
Rob Caldecott18-Jul-06 0:06
Rob Caldecott18-Jul-06 0:06 
GeneralRe: static const int inside class [modified] Pin
vikramlinux18-Jul-06 0:36
vikramlinux18-Jul-06 0:36 
Hey Guys,
What code u have provided is correct. I also mentioned same code in my question. I have 2 concerns

1) const static members can be directly init in class
so what is wrong with normal static members?

2) As normal const vars has to be init at the time of declaration in code(somewhat like references ). In my class I need to init my const var in memberwise init list.

so we have an issue where we have const needs whose init code needs to be inside class and static needs to be outside.

so the soln in compiler is put static const var outside let it be define there.
Here my question is why we can also put it inside class? what is req. forced to provide such facility? what is rational behind that?



-- modified at 6:46 Tuesday 18th July, 2006
QuestionUnregister same registering with 'regsvr32.exe' ? Pin
Andy Rama17-Jul-06 20:46
Andy Rama17-Jul-06 20:46 
AnswerRe: Unregister same registering with 'regsvr32.exe' ? Pin
NiceNaidu17-Jul-06 20:50
NiceNaidu17-Jul-06 20:50 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama17-Jul-06 21:03
Andy Rama17-Jul-06 21:03 
AnswerRe: Unregister same registering with 'regsvr32.exe' ? [modified] Pin
AkiraOne17-Jul-06 20:52
AkiraOne17-Jul-06 20:52 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama17-Jul-06 21:04
Andy Rama17-Jul-06 21:04 
AnswerRe: Unregister same registering with 'regsvr32.exe' ? Pin
Anilkumar K V17-Jul-06 23:37
Anilkumar K V17-Jul-06 23:37 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama18-Jul-06 20:22
Andy Rama18-Jul-06 20:22 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Anilkumar K V18-Jul-06 23:35
Anilkumar K V18-Jul-06 23:35 
AnswerRe: Unregister same registering with 'regsvr32.exe' ? Pin
ThatsAlok18-Jul-06 0:42
ThatsAlok18-Jul-06 0:42 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama18-Jul-06 20:27
Andy Rama18-Jul-06 20:27 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
ThatsAlok18-Jul-06 22:23
ThatsAlok18-Jul-06 22:23 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama19-Jul-06 4:26
Andy Rama19-Jul-06 4:26 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
ThatsAlok19-Jul-06 4:48
ThatsAlok19-Jul-06 4:48 
GeneralRe: Unregister same registering with 'regsvr32.exe' ? Pin
Andy Rama19-Jul-06 20:26
Andy Rama19-Jul-06 20:26 
Questionhow to make a commandLine to wait Pin
kanna_p17-Jul-06 20:24
kanna_p17-Jul-06 20:24 
AnswerRe: how to make a commandLine to wait [modified] Pin
bob1697217-Jul-06 20:33
bob1697217-Jul-06 20:33 
AnswerRe: how to make a commandLine to wait Pin
NiceNaidu17-Jul-06 20:33
NiceNaidu17-Jul-06 20:33 

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.