Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to .rc??? Pin
Hamid_RT18-Jul-06 0:03
Hamid_RT18-Jul-06 0:03 
GeneralRe: How to .rc??? Pin
toxcct18-Jul-06 0:03
toxcct18-Jul-06 0:03 
GeneralRe: How to .rc??? Pin
Hamid_RT18-Jul-06 0:10
Hamid_RT18-Jul-06 0:10 
AnswerRe: How to .rc??? Pin
ThatsAlok17-Jul-06 23:52
ThatsAlok17-Jul-06 23:52 
GeneralRe: How to .rc??? Pin
mimimimilaw17-Jul-06 23:55
mimimimilaw17-Jul-06 23:55 
GeneralRe: How to .rc??? Pin
toxcct17-Jul-06 23:57
toxcct17-Jul-06 23:57 
GeneralRe: How to .rc??? Pin
Maxwell Chen17-Jul-06 23:57
Maxwell Chen17-Jul-06 23:57 
GeneralRe: How to .rc??? Pin
ThatsAlok18-Jul-06 0:05
ThatsAlok18-Jul-06 0:05 
AnswerRe: How to .rc??? Pin
Hamid_RT17-Jul-06 23:54
Hamid_RT17-Jul-06 23:54 
GeneralRe: How to .rc??? Pin
mimimimilaw17-Jul-06 23:58
mimimimilaw17-Jul-06 23:58 
GeneralRe: How to .rc??? Pin
Hamid_RT18-Jul-06 0:03
Hamid_RT18-Jul-06 0:03 
GeneralRe: How to .rc??? Pin
mimimimilaw18-Jul-06 0:23
mimimimilaw18-Jul-06 0:23 
GeneralRe: How to .rc??? Pin
Hamid_RT18-Jul-06 0:57
Hamid_RT18-Jul-06 0:57 
Questionabout the IVMRMixerControl9 in dshow Pin
blackeye200417-Jul-06 22:42
blackeye200417-Jul-06 22:42 
QuestionWindows Hooks Pin
ERLN17-Jul-06 22:33
ERLN17-Jul-06 22:33 
AnswerRe: Windows Hooks Pin
Hamid_RT18-Jul-06 0:00
Hamid_RT18-Jul-06 0:00 
GeneralRe: Windows Hooks Pin
ERLN18-Jul-06 1:03
ERLN18-Jul-06 1:03 
QuestionDirectX Programming Pin
Kuroro Rucilful17-Jul-06 22:19
Kuroro Rucilful17-Jul-06 22:19 
AnswerRe: DirectX Programming Pin
NiceNaidu17-Jul-06 22:54
NiceNaidu17-Jul-06 22:54 
GeneralRe: DirectX Programming Pin
Kuroro Rucilful17-Jul-06 22:58
Kuroro Rucilful17-Jul-06 22:58 
Questionstatic const int inside class Pin
vikramlinux17-Jul-06 22:15
vikramlinux17-Jul-06 22:15 
hie Guys,

I have a class like

class ABC
{
public:
static const int var=10;
};

Here initialing the var with 10 is allowed inside class.

In early compilers(I have VC 6.0) it does not work but it works with VC7.0.

Rule says that only static integral constants are allowed to be initialized inside class.

May I know why this requirement came when we already have following facility as shown belows


class ABC
{
public:
static const int var;

};

const int ABC:: var =10;


Also My question is where is the compiler putting this code - static const int var=10 when it is inside a class?
It can not be in constructor or in memberwise Initialization list.So what is workaround? Why this is special case?


Vikram S
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 

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.