I wrote a program that gives any RGB value and can find similar colors from the program. But the result is a little confusing. The program is a little ...
I wrote a program that gives any RGB value and can find similar colors from the program. But the result is a little confusing. The program is a little ...
I wonder where are predefined macros are defined and resided in? Predefined macros are defined in compiler or preprocessor which has a dictionary tha ...
I need to get build date of a module. I use __DATE__ macro. But it looks like if the file which contains this macro is not changed then it is not comp ...
GCC 9 has recently changed the behavior of the __LINE__ directive in some cases. The program below illustrates the change: Because the macro expand ...
I am currently dealing with legacy code designed for Turbo C++. To work around Turbo C++'s lack of a bool data type, the program contains the followin ...
I am trying to pass a defined macro to my program at compile time like this: and compile with g++ -DKEY_CNT=2 -O2 test_3.cpp -o test_3 and it works ...
What is swift replacement of traditional c-style #error keyword? I need it to raise compile-time error when pre-defines failed: ...
I would like to be able to do something like this using visual c++ compiler (vc12): But I cannot find a predefined macro for this purpose. Context ...
So I'm working on a windows application and I've decided to write several helper functions to check the HRESULT returned by any com-related function w ...
The directive: The command-line: g++ -Wall -Wextra -std=c++14 -c -o header.o header.hpp My g++ version: g++ (tdm-1) 4.9.2 The error C++14 is requ ...
Is there Predefined-Macros define about byte order in armcc. I am a novice on the armcc.and sorry for my English. In gcc these are macros: __BYTE_O ...
What I expected: LINE_FILE = "Line linenumber of file filename" and printf() can output this string. http://ww2.sinaimg.cn/large/005FchG6gw1 ...
I need the file name only where the __FILE__ and __FILEW__ macros return the whole path. I defined the following: I am using it as follows: I g ...
In a lot of Linux kernel modules (hardware drivers) their source header files, one can spot lines like: __VMKLNX__ is not defined in the source cod ...
I have a C++ library that uses the predefined macro __FUNCTION__, by way of crtdefs.h. The macro is documented here. Here is my usage: my.cpp crtd ...
I've found these lines in the libmagic code. What do they mean? What does __GNUC__ mean? It seems to check whether GCC is installed. What is __at ...
I have a c++ project that has to print a revision string. The revision string is company wise specified and the protocol includes the build time as yy ...
I often find myself writing something like I would like to be able to write this as a single one-line macro. It must be free of side effects, in th ...
In earlier versions of Visual Studio, there was a predefinied macro "_CPPLIB_VER" which reported the version of the Dinkumware STL Library shipped wit ...
I am using CDT for building a system comprised of many projects. Some of the system elements are dependent on the Configuration type - Debug or Releas ...