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++ / June 2005

Tip: Looking for answers? Try searching our database.

VC++2005 equivalent code of partial C# keyword

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tlemcenvisit - 17 Jun 2005 10:15 GMT
Hello
in C# : Partial type definitions allow the definition of a class, struct or
interface to be split into multiple files.
I'd like to have the equivalent keyword of partial in VC++
does someone has an idea?
Thanks in advance
Hendrik Schober - 17 Jun 2005 11:01 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class, struct or
> interface to be split into multiple files.
> I'd like to have the equivalent keyword of partial in VC++
> does someone has an idea?

 You can only split the definition of a class'
 member functions over as many file as you
 like. The class itself needs to be defined in
 one piece.

> Thanks in advance

 Schobi

Signature

SpamTrap@gmx.de is never read
I'm Schobi at suespammers dot org

"Coming back to where you started is not the same as never leaving"
Terry Pratchett

tlemcenvisit - 17 Jun 2005 12:02 GMT
I want an equivalent to "partial" keyword
Hendrik Schober - 17 Jun 2005 12:43 GMT
> I want an equivalent to "partial" keyword

 Which I don't know.

 Schobi

Signature

SpamTrap@gmx.de is never read
I'm Schobi at suespammers dot org

"Coming back to where you started is not the same as never leaving"
Terry Pratchett

Carl Daniel [VC++ MVP] - 17 Jun 2005 14:30 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class,
> struct or interface to be split into multiple files.
> I'd like to have the equivalent keyword of partial in VC++
> does someone has an idea?
> Thanks in advance

There is no equivalent.

-cd
Gustavo L. Fabro - 21 Jun 2005 19:06 GMT
> Hello
> in C# : Partial type definitions allow the definition of a class, struct
[quoted text clipped - 3 lines]
> does someone has an idea?
> Thanks in advance

Hmmmm in what context would you like this? Meaning, why exactly
you want to split a class definition in multiple .h files?

You could always play with the preprocessor, I believe!

ClassX.h:
--------Cut here --------------
class X
{
public:
 void f1();
 void f2();
 void f3();

#include "classX2.h"
--------Cut here --------------

ClassX2.h:

--------Cut here --------------
void f4();
void f5();
#include "classX3.h"
--------Cut here --------------

ClassX3.h:

--------Cut here --------------
private:
void f6();
int a,b,c;

}
--------Cut here --------------

But I don't easily see an advantage on doing this and wouldn't recommend it.

Fabro

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.