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 PostYou decide some condition that should never, ever happen and assert is used to abort your code at that point if it does happen, so you definitely know that the very bad thing happened (and then you fix it).
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.