Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Use ellipsis in macro definition VC6

Posted on 2006-11-30
1
806 Views
Last Modified: 2012-08-13
Hi,

i am using Visual C/C++ 6.0 and would like to define a macro which make use of ellipsis.

like this: #define MY_MACRO(...) printf(...)

it works in linux, but seems like the VC compiler dont like it.

Does someone has an idea for this?
0
Comment
Question by:woigl
1 Comment
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 18043657
Hi woigl,

Variadic macros were added to C standard in ISO 1999 .. Prior to that they were supported as compiler specific extensions to C.
gcc had supported variadic macros for long ... quite some time before ISO99. However, at that time, VC++ did not have support for variadic macros ...

Newer version do support variadic macros ... I just tried compling an example with VS2005 and it compiled fine.

Cheers!
sunnycoder
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question