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++ / August 2004

Tip: Looking for answers? Try searching our database.

Compiler Error C3222

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel =?iso-8859-1?Q?Lidstr=F6m?= - 30 Aug 2004 09:26 GMT
Compiler Error C3222'parameter' : cannot declare default arguments for
member functions of a managed type

Arrrgggghhhhh!
Roman Yankin - 30 Aug 2004 14:03 GMT
Here us what you can do, say you have the situation like in MS sample:

// C3222.cpp
// compile with: /clr
#using <mscorlib.dll>
public __gc class G
{
  void f( int n = 0 );   // C3222
};You can workaround this problem by adding overloaded member function with
no parameters and call the original function from there:

// NoC3222.cpp
// compile with: /clr
#using <mscorlib.dll>
public __gc class G
{
  void f( int n );
  void f(void);
};

void G::f(int n){
   //do something with n here
}

void G::f(){
  f(100);
}

> Compiler Error C3222'parameter' : cannot declare default arguments for
> member functions of a managed type
>
> Arrrgggghhhhh!

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.