Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

[C++-CLI] Function with variable parameters list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marco Segurini - 02 Nov 2004 17:09 GMT
Hi,

this code is from "C++/CLI Language Specification Working Draft 1.7,
Sep, 2004"

//---
void F(... array<int>^ args)
{
   Console::WriteLine("# of arguments: {0}", args->Length);
   for (int i = 0; i < args->Length; i++)
      Console::WriteLine("\targs[{0}] = {1}", i, args[i]);
}
int main()
{
   F();
   F(1); 10
   F(1, 2);
   F(1, 2, 3);
   F(gcnew array<int> {1, 2, 3, 4});
}
//---

I like to know if the C++ compiler of VS2005 beta 1 supports this example.

TIA.
Marco.
Signature


For direct reply change underscore to dot

Tomas Restrepo \(MVP\) - 03 Nov 2004 00:17 GMT
Hi Marco,

> this code is from "C++/CLI Language Specification Working Draft 1.7,
> Sep, 2004"
[quoted text clipped - 17 lines]
>
> I like to know if the C++ compiler of VS2005 beta 1 supports this example.

Not the one on beta 1, but the compiler tools update does. You can get it
(and install it over the beta 1 command line tools so that you can use them
with the IDE) from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=afd04ff1-9d16-439a-9a5e
-e13eb0341923&displaylang=en


Signature

Tomas Restrepo
tomasr@mvps.org


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.