[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Use ellipsis in macro definition VC6

Posted on 2006-11-30
1
Medium Priority
?
819 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
[X]
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
1 Comment
 
LVL 45

Accepted Solution

by:
sunnycoder earned 2000 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

650 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