What's the difference between using a typedef or a #define for a user-defined type?

See question 1.13. Comp.lang. C FAQ list · Question 10.5b Q: What's the difference between const MAXSIZE = 100; and #define MAXSIZE 100 A: A preprocessor #define gives you a true compile-time constant.

In C, const gives you a run-time object which you're not supposed to try to modify; ``const'' really means ``readonly''. See also the question 11.8. (But in C++, const is closer to #define.) Additional links: longer explanation comp.lang. C FAQ list · Question 10.6 Q: I'm splitting up a program into multiple source files for the first time, and I'm wondering what to put in .

C files and what to put in . H files. (What does ``.

H'' mean, anyway?) A: As a general rule, you should put these things in header (.h) files: macro definitions (preprocessor #defines) structure, union, and enumeration declarations typedef declarations external function declarations (see also question 1.11) global variable declarations It's especially important to put a declaration or definition in a header file when ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions