Click here to Skip to main content
15,395,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Opening other application from our own application Pin
Cool Ju9-Feb-06 19:30
MemberCool Ju9-Feb-06 19:30 
AnswerRe: Opening other application from our own application Pin
csc9-Feb-06 20:38
Membercsc9-Feb-06 20:38 
QuestionDifference between Typedef and #define? Pin
Link26009-Feb-06 18:23
MemberLink26009-Feb-06 18:23 
AnswerRe: Difference between Typedef and #define? Pin
QuickDeveloper9-Feb-06 18:51
MemberQuickDeveloper9-Feb-06 18:51 
AnswerRe: Difference between Typedef and #define? Pin
Rage9-Feb-06 21:20
professionalRage9-Feb-06 21:20 
GeneralRe: Difference between Typedef and #define? Pin
BadKarma9-Feb-06 22:07
MemberBadKarma9-Feb-06 22:07 
GeneralRe: Difference between Typedef and #define? Pin
Rage10-Feb-06 1:25
professionalRage10-Feb-06 1:25 
GeneralRe: Difference between Typedef and #define? Pin
BadKarma10-Feb-06 2:15
MemberBadKarma10-Feb-06 2:15 
Hi,

don't take this wrong, but the question was which is preferred,
using #define or typedef to create a new type. You said its preferred
to use typedef (which I agreeSmile | :) ) because when using #define the compiler
wouldn't be able to check the types.
I just stated the latter, as false.
Rage wrote:
#define a 3

I agree that the 3 doesn't resemble a single type, but that wasn't what i meant.

Rage wrote:
..., but const is definitely better than a #define.

I could agree to this if one is writing an application for Computer based systems.
But when writing for embeded systems, where 2MB of memory is already considered to be a luxery,
every byte that you can save by using #defined constants is worthwhile.

And when it comes to MFC there is no such thing as a SIMPLE macros Laugh | :laugh:





codito ergo sum
GeneralRe: Difference between Typedef and #define? Pin
Rage10-Feb-06 2:55
professionalRage10-Feb-06 2:55 
GeneralRe: Difference between Typedef and #define? Pin
Ryan Binns10-Feb-06 11:58
MemberRyan Binns10-Feb-06 11:58 
GeneralRe: Difference between Typedef and #define? Pin
normanS12-Feb-06 20:14
MembernormanS12-Feb-06 20:14 
AnswerRe: Difference between Typedef and #define? Pin
Ryan Binns9-Feb-06 21:41
MemberRyan Binns9-Feb-06 21:41 
GeneralRe: Difference between Typedef and #define? Pin
jhwurmbach10-Feb-06 3:09
Memberjhwurmbach10-Feb-06 3:09 
GeneralRe: Difference between Typedef and #define? Pin
Blake Miller10-Feb-06 4:13
MemberBlake Miller10-Feb-06 4:13 
GeneralRe: Difference between Typedef and #define? Pin
jhwurmbach10-Feb-06 4:23
Memberjhwurmbach10-Feb-06 4:23 
GeneralRe: Difference between Typedef and #define? Pin
Blake Miller10-Feb-06 4:28
MemberBlake Miller10-Feb-06 4:28 
GeneralRe: Difference between Typedef and #define? Pin
jhwurmbach10-Feb-06 4:34
Memberjhwurmbach10-Feb-06 4:34 
GeneralRe: Difference between Typedef and #define? Pin
Blake Miller10-Feb-06 4:41
MemberBlake Miller10-Feb-06 4:41 
GeneralRe: Difference between Typedef and #define? Pin
BadKarma10-Feb-06 4:38
MemberBadKarma10-Feb-06 4:38 
GeneralRe: Difference between Typedef and #define? Pin
Blake Miller10-Feb-06 4:46
MemberBlake Miller10-Feb-06 4:46 
GeneralRe: Difference between Typedef and #define? Pin
Ryan Binns10-Feb-06 11:53
MemberRyan Binns10-Feb-06 11:53 
QuestionMy string class Pin
Sarvan AL9-Feb-06 17:56
MemberSarvan AL9-Feb-06 17:56 
AnswerRe: My string class Pin
Bernhard9-Feb-06 19:57
MemberBernhard9-Feb-06 19:57 
AnswerRe: My string class Pin
Owner drawn9-Feb-06 21:22
MemberOwner drawn9-Feb-06 21:22 
AnswerRe: My string class Pin
ThatsAlok10-Feb-06 0:06
MemberThatsAlok10-Feb-06 0:06 

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.