473,398 Members | 2,404 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,398 software developers and data experts.

"n Parameter" in C++

neo
I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?

Tell me some links for study "n Parameters" techniques in C++.

Regards,
-aims

Aug 7 '06 #1
4 2578
neo wrote:
I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?
Lookup the header <cstdarg>. The ellipsis is generally avoided in C++
because it is not typesafe. Prefer overloaded functions (see your
favorite C++ book) or method chaining (see
http://www.parashift.com/c++-faq-lit...s.html#faq-8.4 and
http://www.parashift.com/c++-faq-lit...tml#faq-10.18).
Tell me some links for study "n Parameters" techniques in C++.
Any book that covers advanced techniques in C. As I say, it is eschewed
in C++.

Cheers! --M

Aug 7 '06 #2
Look in to va_args, va_list, va_start, va_end.

Dheeraj

neo wrote:
I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?

Tell me some links for study "n Parameters" techniques in C++.

Regards,
-aims
Aug 7 '06 #3
neo
thanks.

regards,
Mohammad Omer Nasir.
Dheeraj wrote:
Look in to va_args, va_list, va_start, va_end.

Dheeraj

neo wrote:
I want to make one function for pass "n Parameter" with respective
functionality, "..." use for parameter but I am not understand how
use "..." in function and what is the technical name of this
technique?

Tell me some links for study "n Parameters" techniques in C++.

Regards,
-aims
Aug 8 '06 #4

neo wrote:
thanks.
Do not thank anyone. Rethink your design as variable-length
parameterlists are an abomination in C++. Also their use is very
limited - you cant pass classes that way.

/Peter
>
regards,
Mohammad Omer Nasir.
Dheeraj wrote:
Look in to va_args, va_list, va_start, va_end.
[snip]

Aug 8 '06 #5

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

Similar topics

3
by: Mysooru | last post by:
Hi All, One of the ATL class..... template <class Base> class CComObject : public Base { public: typedef Base _BaseClass;
3
by: Ian Lazarus | last post by:
// why is the error message being generated? // Microsoft Visual C/C++ 5.0 class Bar { public: void Log(const char* p){ } }; class Foo : public Bar
2
by: John A Grandy | last post by:
Is there something special in XML about the name "Parameter" ... I am not able to XPATH query for nodes named "Parameter" <Root> <Category CategoryID="1"> <Elements> <Element...
4
by: Ondrej Spanel | last post by:
The code below does not compile with .NET 2003, I get folowing error: w:\c\Pokusy\delegTemplArg\delegTemplArg.cpp(11) : error C2993: 'float' : illegal type for non-type template parameter 'x' ...
8
by: eminemence | last post by:
Hi, I have been trying to get STLPort work for Symbian. I am using CodeWarrior compiler and it spews this errors namely *************************************************************************...
11
by: Charles Sullivan | last post by:
I have a number of functions, e.g.: int funct1( int arg1, int arg2, int arg3 ); int funct2( int arg1, int arg2, int arg3 ); int funct3( int arg1, int arg2, int arg3 ); that are called via...
2
by: Nemisis | last post by:
Hi, Is it possible to pass in an object and parameter into a function and return it as a string. i.e. To make a call to the function i would put the following Dim str as String =...
1
by: eBob.com | last post by:
I have some code which is trying to determine where text will wrap in a custom text box (which Inherits from Control). It determines the number of characters which will fit in the first line, but...
2
by: manontheedge | last post by:
I'm trying to pass a pointer of a class into another class' constructor. I keep getting the error "missing default parameter", here's a hopefully simplified example of what I'm trying to do... ...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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.