Hi
what are Macros used for in C++? i never heard this word in my entire life :D
and what are assert()
and NDEBUG
?
Sarkurd
0
Junior Poster in Training
Recommended Answers
Jump to PostThey're used by the preprocessor to replace things in your code with other things (including replacing things with blank space - effectively just removing them).
Jump to Post
assert()
is very useful (and commonly used) in debugging new code or unit testing code. You build it debuggable, run your tests, and if an assert (used for range/bounds checking, valid states and data, etc) triggers, then you can run the code in the debugger and see what is going …
All 6 Replies
Moschops
683
Practically a Master Poster
Featured Poster
Sarkurd
0
Junior Poster in Training
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Moschops
683
Practically a Master Poster
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Sarkurd
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.