Click here to Skip to main content
15,918,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Timers in MFC Pin
Michael Dunn4-Oct-03 6:28
sitebuilderMichael Dunn4-Oct-03 6:28 
GeneralRe: Timers in MFC Pin
Ted Ferenc4-Oct-03 7:41
Ted Ferenc4-Oct-03 7:41 
GeneralRe: Timers in MFC Pin
BoudewijnEctor4-Oct-03 9:15
BoudewijnEctor4-Oct-03 9:15 
GeneralChecking to see if filename entered Pin
NewHSKid4-Oct-03 5:33
NewHSKid4-Oct-03 5:33 
GeneralRe: Checking to see if filename entered Pin
Terry O'Nolley4-Oct-03 6:26
Terry O'Nolley4-Oct-03 6:26 
GeneralInformation extraction Pin
Member 6221644-Oct-03 5:15
Member 6221644-Oct-03 5:15 
GeneralRe: Information extraction Pin
Neville Franks4-Oct-03 11:48
Neville Franks4-Oct-03 11:48 
GeneralType Variable Pin
Aidman4-Oct-03 5:09
Aidman4-Oct-03 5:09 
Hi,

I am in need of a variable that can hold a type (variable-type ex: int or double) and not a value of the specific type, just the type. Something that works like this:
VARTYPE Type;

Type = int; // The type is integer.

switch (Type) {
	case short: // The type is short.
	//...
	break;
	case int: // The type is integer.
	//...
	break;
	case float: // The type is float.
	//...
	break;
	case double: // The type is double.
	//...
	break;
}
I know I can simply declare a bunch of constant numbers, who each represents a variable type. But that would be very non-optimal if there already exists an easier way. Could I use templates to achieve this or the use of preprocessors/macros? Just to be clear, I am looking for a variable that only contains a type and not a value.

Any help or tips are most appreciated. Smile | :)

Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
GeneralRe: Type Variable Pin
includeh104-Oct-03 5:22
includeh104-Oct-03 5:22 
GeneralRe: Type Variable Pin
Ian Darling4-Oct-03 5:27
Ian Darling4-Oct-03 5:27 
GeneralRe: Type Variable Pin
Ian Darling4-Oct-03 5:30
Ian Darling4-Oct-03 5:30 
GeneralRe: Type Variable Pin
Neville Franks4-Oct-03 11:53
Neville Franks4-Oct-03 11:53 
GeneralRe: Type Variable Pin
Michael Dunn4-Oct-03 6:42
sitebuilderMichael Dunn4-Oct-03 6:42 
GeneralRe: Type Variable Pin
Ian Darling4-Oct-03 7:57
Ian Darling4-Oct-03 7:57 
GeneralRe: Type Variable Pin
Michael Dunn4-Oct-03 8:05
sitebuilderMichael Dunn4-Oct-03 8:05 
GeneralRe: Type Variable Pin
Ian Darling4-Oct-03 8:12
Ian Darling4-Oct-03 8:12 
GeneralRe: Type Variable Pin
Michael Dunn4-Oct-03 8:21
sitebuilderMichael Dunn4-Oct-03 8:21 
GeneralRe: Type Variable Pin
Aidman4-Oct-03 8:29
Aidman4-Oct-03 8:29 
GeneralRe: Type Variable Pin
Neville Franks4-Oct-03 11:51
Neville Franks4-Oct-03 11:51 
QuestionHow to implement ASPELL with MFC ??? Pin
tankhoasp3-Oct-03 20:10
tankhoasp3-Oct-03 20:10 
AnswerRe: How to implement ASPELL with MFC ??? Pin
abc8764-Oct-03 2:21
abc8764-Oct-03 2:21 
GeneralVC7.1 IDE: Toolbars for debug Pin
peterchen3-Oct-03 19:59
peterchen3-Oct-03 19:59 
GeneralRe: VC7.1 IDE: Toolbars for debug Pin
spiritualfields3-Oct-03 20:56
spiritualfields3-Oct-03 20:56 
Questionhow to monitor application's access to network (say,internet)? Pin
lxy5103-Oct-03 19:03
lxy5103-Oct-03 19:03 
AnswerRe: how to monitor application's access to network (say,internet)? Pin
abc8764-Oct-03 2:14
abc8764-Oct-03 2:14 

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.