Click here to Skip to main content
15,890,185 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How can i shorten my array using enum? Pin
SandipG 28-May-08 21:13
SandipG 28-May-08 21:13 
AnswerRe: How can i shorten my array using enum? Pin
monsieur_jj28-May-08 21:18
monsieur_jj28-May-08 21:18 
GeneralRe: How can i shorten my array using enum? Pin
SandipG 28-May-08 21:19
SandipG 28-May-08 21:19 
GeneralRe: How can i shorten my array using enum? Pin
monsieur_jj28-May-08 21:25
monsieur_jj28-May-08 21:25 
GeneralRe: How can i shorten my array using enum? Pin
Arman S.28-May-08 21:28
Arman S.28-May-08 21:28 
GeneralRe: How can i shorten my array using enum? Pin
SandipG 28-May-08 21:30
SandipG 28-May-08 21:30 
GeneralRe: How can i shorten my array using enum? Pin
monsieur_jj28-May-08 21:36
monsieur_jj28-May-08 21:36 
GeneralRe: How can i shorten my array using enum? Pin
SandipG 28-May-08 21:46
SandipG 28-May-08 21:46 
You have to declre enum for the strings u want to use.
e.g.
enum {EVERY_MONDAY,EVERY_SUNDAY...}
enum {TWELVE_AM..}

then you can even write a function that will return the strings whenever required.

e.g
CString/char* GetDay(int iVal)
{
switch(iVal)
{
case EVERY_MONDAY:
return "EVERY_MONDAY";
}
...
}
inside code where ever you wan to use you can directly use EVERY_MONDAY...

and offciourse you have to give names to enum you will be creting.
I guess you have never used enums. may be you can read some help for regarding enums.
AnswerRe: How can i shorten my array using enum? Pin
_AnsHUMAN_ 28-May-08 21:29
_AnsHUMAN_ 28-May-08 21:29 
AnswerRe: How can i shorten my array using enum? Pin
Rajesh R Subramanian28-May-08 22:03
professionalRajesh R Subramanian28-May-08 22:03 
AnswerRe: How can i shorten my array using enum? Pin
Nibu babu thomas28-May-08 22:29
Nibu babu thomas28-May-08 22:29 
GeneralRe: How can i shorten my array using enum? [modified] Pin
Rajesh R Subramanian28-May-08 22:49
professionalRajesh R Subramanian28-May-08 22:49 
AnswerRe: How can i shorten my array using enum? Pin
David Crow29-May-08 4:04
David Crow29-May-08 4:04 
GeneralRe: How can i shorten my array using enum? Pin
Rajkumar R29-May-08 19:50
Rajkumar R29-May-08 19:50 
GeneralRe: How can i shorten my array using enum? Pin
David Crow30-May-08 4:10
David Crow30-May-08 4:10 
QuestionHow to know whether our application is focused or not? Pin
Super Hornet28-May-08 20:43
Super Hornet28-May-08 20:43 
AnswerRe: How to know whether our application is focused or not? Pin
SandipG 28-May-08 21:18
SandipG 28-May-08 21:18 
QuestionRe: How to know whether our application is focused or not? Pin
David Crow29-May-08 4:09
David Crow29-May-08 4:09 
QuestionHow to get URL of current web page by any method? Pin
sumit.durg28-May-08 20:30
sumit.durg28-May-08 20:30 
AnswerRe: How to get URL of current web page by any method? Pin
Rajesh R Subramanian28-May-08 20:42
professionalRajesh R Subramanian28-May-08 20:42 
GeneralRe: How to get URL of current web page by any method? Pin
ShilpiP28-May-08 20:53
ShilpiP28-May-08 20:53 
GeneralRe: How to get URL of current web page by any method? Pin
SandipG 28-May-08 21:11
SandipG 28-May-08 21:11 
JokeRe: How to get URL of current web page by any method? Pin
_AnsHUMAN_ 28-May-08 22:10
_AnsHUMAN_ 28-May-08 22:10 
QuestionHow to use SetFormat function of class CDateTimeCtrl properly Pin
varun0128-May-08 20:26
varun0128-May-08 20:26 
AnswerRe: How to use SetFormat function of class CDateTimeCtrl properly Pin
_AnsHUMAN_ 28-May-08 20:34
_AnsHUMAN_ 28-May-08 20:34 

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.