473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Understanding unlimited arguments with ...

Hello,

I've been using Visual Studio.NET for some time, and I had this
definition of a function in a class:

void throwIt(int id, ErrorType type, ...) throw(...);

I am trying to port my code over to linux to work with G++, and I
received this error:

parse error before `...' token

Am I using non-standard code here?

Thank you,
Kevin Grigorenko
Jul 22 '05 #1
2 1633
"Kevin Grigorenko" <ke***@myplaceonline.com> wrote...
I've been using Visual Studio.NET for some time, and I had this
definition of a function in a class:

void throwIt(int id, ErrorType type, ...) throw(...);
There is no exception specification "throw(...)". It's either
"throw()" to state that the function throws _nothing_ or it's
omitted to state that it can throw _anything_.

I am trying to port my code over to linux to work with G++, and I
received this error:

parse error before `...' token

Am I using non-standard code here?


Yes. If you want to claim that your function can/will throw
_anything_, just leave the exception specification out:

void throwIt(int, ErrorType, ...);

Also, make sure your compiler actually understands exception
specifications before attempting to use them.

Victor
Jul 22 '05 #2
I believe that Visual C++ supports throw(...) following a function
declaration to indicate that the function could throw an exception. Not
standard C++ and it can be removed without altering the program behavior.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: caw | last post by:
this is the smallest bit of code I could get to demonstrate what I want to understand... def msg(text): def decorate(f): def new_f(*args): print text, f(*args) return new_f return decorate
47
by: Jeff Relf | last post by:
Hi All, I plan on using the following C++ code to create nodes with unlimited children: // I would like to declare NodeT like this, // but it won't compile because Lnk_T is not defined yet....
5
by: siliconwafer | last post by:
Hi All, What does a 'format specifier' do? Suppose I do, int a = 43; //decimal number printf("%x",a); I will get hex equivalent of 43. Does the format specifier do an implicit "decimal to hex"...
3
by: Redefined Horizons | last post by:
I'm trying to understand the argument flags that are used in the method table of an extension module written in C. First let me ask this question about the method table. Is it an C array named...
3
by: Divick | last post by:
I was reading this section in Bruce Eckel's book which talks about passing and returning large objects ( Chapter 11: References & the Copy-Constructor ), where he explains that how to return big...
2
by: tagnum | last post by:
I have written a program for unlimited categories depth, which is in use for few ecommerce websites. Like many others, I used one SQL table to store the category relation (or the tree structure)....
1
by: Unlimited Free Domain & Web Hosting | last post by:
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space...
13
by: Sri Harsha Dandibhotla | last post by:
Hello all. I recently came across a function declaration as : char(*(*x()))(); This was not in some code but it was in a C questions thread on some group. I tried to decipher what it returns but...
12
by: kevin.eugene08 | last post by:
Hello all, Forgive the somewhat simple question I am sure this will be, but I am having some problem understanding what: char **argv looks like. For instance, i know through trial and error...
0
by: santhoshkumar547 | last post by:
Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on http://amazingworld4all.blogspot.com Download free unlimited sofware on...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.