-
C++ printf Debugging using macros / g++ -std=c++17 macro.cpp -o macro코딩Coding/make★gcc★&g++★clang★compiler 2022. 10. 26. 19:46728x90
macro.cpp
28분 29초
// macro.cpp // g++ -std=c++17 macro.cpp -o macro #include <iostream> // Note the '\' allos us to use multiple lines #define PRINT(x, line, file) \ std::cout << file << ":" << line << ": "; \ std::cout << "Value is : " << (x) << "\n"; int main() { float PI = 3.1415; PRINT(PI,__LINE__,__FILE__) return 0; }
PS D:\young_project\cpp_lang\macro> .\macro.exe macro.cpp:12: Value is : 3.1415
반응형'코딩Coding > make★gcc★&g++★clang★compiler' 카테고리의 다른 글
C/C++ 빌드(GNU, gcc)❤ 중 라이브러리 순서때문에 꼬이는 경우에는... (0) 2023.03.21 윈도우에 초코로 Cmake PATH설정까지 끝 (0) 2022.12.15 Clang&Gcc❤️-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic - use these and consider the following (see descriptions below) (0) 2022.12.04 Make 사용 가이드Makefile만들기 (0) 2022.11.26 g++ -std=c++17 main.cpp -o main / g++ -Wall -Wextra -std=c++17 main.cpp -o main / clang++ (0) 2022.10.26 윈도우에서 build.sh 실행하는 방법. (0) 2022.09.28 Windows개발환경 세팅 mingw64 (0) 2022.09.19 g++20 compiler 터미널 명령어 블로그 (0) 2022.09.10