View Single Post
  #5 (permalink)  
Old 10-05-2006, 12:36 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 4,092
Last Blog:
Why Learn Data Structu...
Credits: 28
Rep Power: 45
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default

According to Bjarne Stroustrup, you should use const for variables and inline for functions. These are the exact same things that macros are used for in C, but without the same controls. For example, C++ will do type checking on a const variable, but not on a macro. I've seen the same advice in other books about C++. Basicly, macros should be the tool of last resort, not part of a tutorial with an eager introduction.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Reply With Quote

Sponsored Links