How to use macros is to provide debugging information in C++

1 Answer

0 votes
#include <iostream>

int main() {
    std::cout << "Error in " << __FILE__ << " at line " << __LINE__;
}




/*
run:

Error in test.cpp at line 4

*/

 



answered Dec 3, 2022 by avibootz
...