is namespace like Macro.

I do get class and function

Is namespace a form of a macro
so more in the time to process is where my question is.

less time to process

macro
namespace
class
function

most time to process

thanks
No, not a macro.

Namespace is like area code in phone numbers.


Time for whom to process?
time for the processor to process the code

my instructor allwas tells us that macro are better
it save time instead of calling to a function and class takes more time.

It is like a include but it is only namespace you uses namespace show

I am trying to set my on liberary up
my instructor allwas tells us that macro are better


Your instructor is not very well informed.
The code is processed in editor by programmer that has to maintain the code.
The code is processed by program called "preprocessor".
The code is processed by program called "compiler".
The object code is processed by program called "linker".
The executable binary is run.

You don't do any of that without CPU, but some steps are much more costly than the others. You can do trade-offs, but are they really profitable?

Your instructor claims that macros are better.
Some instructors claim that macros are evil.
my instructor does use the word pre process and at compiler
but see if I have it right

namespace
class || struct *template can be used
function *template can be used

namespace can not be embedded side other ex. for run from using namespace
Topic archived. No new replies allowed.