Hi,
Just wonder if there is any way to get this information while compiling your source code, what I mean is if I can do something like this:

//pseudo code
if (IDE == BORLAND) cerr << "You are using: " << _COMPILER << endl;
if (IDE == VISUAL_STUDIO) cerr << "You are using: " << _COMPILER << endl;

Thank you for any help

Compilers usually have macros for versioning. You can use those to figure out which compiler is doing the compiling:

#if !defined(_MSC_VER)
#error Microsoft Visual Studio is required
#endif
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.