By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,804 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,804 IT Pros & Developers. It's quick & easy.

public keyword usage in managed c++

P: n/a
I have this line:

__gc public class WindowsMain : public Form {
.....

What does the first public keyword?
I can't find anything about that in the docs.

Thanks!
Jul 22 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"CeZaR" <pa****@go.ro> wrote in message news:fc**************************@posting.google.c om...
I have this line:

__gc public class WindowsMain : public Form {
....

What does the first public keyword?
I can't find anything about that in the docs.

Doesn't look legal in C++. You'll have to go ask in a .NET
group if you want to know about Microsoft's abuse of the language.

Jul 22 '05 #2

P: n/a
CeZaR wrote:
I have this line:

__gc public class WindowsMain : public Form {
....

What does the first public keyword?
I can't find anything about that in the docs.

In the current C++/CLI draft standard which will replace and extend the
current "managed extensions", it is mentioned:

"The use of public in this context indicates that the type will be
visible outside the assembly. Conversely, the private indicates that the
type will not be visible outside the assembly. The default visibility
for a type is private."


Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #3

P: n/a
On Thu, 19 Aug 2004 16:00:09 +0300, Ioannis Vranos
<iv*@guesswh.at.grad.com> wrote in comp.lang.c++:
CeZaR wrote:
I have this line:

__gc public class WindowsMain : public Form {
....

What does the first public keyword?
I can't find anything about that in the docs.

In the current C++/CLI draft standard which will replace and extend the
current "managed extensions", it is mentioned:


Please keep your off-topic garbage out of this newsgroup. The ONLY
standards that are relevant here are ISO 14882 and such of ISO 9998 as
happens to be included by reference in 14882.

Whatever draft standard you are talking about does not, and will not,
change so much as a comma of the standards that matter here.

There is no such thing as "managed" C++ in this group.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #4

P: n/a
Jack Klein wrote:
Please keep your off-topic garbage out of this newsgroup. The ONLY
standards that are relevant here are ISO 14882 and such of ISO 9998 as
happens to be included by reference in 14882.

Whatever draft standard you are talking about does not, and will not,
change so much as a comma of the standards that matter here.

There is no such thing as "managed" C++ in this group.

However C++/CLI standard is a standard concerning C++, so it is on topic
here. And code in C++/CLI is portable to all CLI VMs in all OSes.


Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #5

P: n/a
Ioannis Vranos wrote:

However C++/CLI standard is a standard concerning C++, so it is on topic
here. And code in C++/CLI is portable to all CLI VMs in all OSes.


That's like saying that code specific to a deriving class is "on-topic"
inside a base class. It's clearly not.
Jul 22 '05 #6

P: n/a
> What does the first public keyword?
I can't find anything about that in the docs.


From Managed Extensions for C++ Language Specification:

4. __gc Classes

http://msdn.microsoft.com/library/de...spec_start.asp

"By default, a __gc class is not visible outside its assembly. To make
a __gc class visible outside its assembly, use the public access
modifier (public __gc MyClass)."

And from
21.1. Class Visibility

http://msdn.microsoft.com/library/de...sspec_21_1.asp

"The public class-visibility-specifier indicates that a class will be
visible to any source files that contain a #using directive for its
containing assembly. Conversely, the private
class-visibility-specifier indicates that a type will not be visible
to any source files that contain a #using directive for its containing
assembly. However, private types are visible within the same assembly.
The default visibility for a class is private."

Hope it helps.
Jul 22 '05 #7

P: n/a
Ioannis Vranos wrote:

Jack Klein wrote:
Please keep your off-topic garbage out of this newsgroup. The ONLY
standards that are relevant here are ISO 14882 and such of ISO 9998 as
happens to be included by reference in 14882.

Whatever draft standard you are talking about does not, and will not,
change so much as a comma of the standards that matter here.

There is no such thing as "managed" C++ in this group.


However C++/CLI standard is a standard concerning C++, so it is on topic
here. And code in C++/CLI is portable to all CLI VMs in all OSes.


C++/CLI is NOT C++. The fact that it is a draft or a standard is
completely irrelevant, as well as its portability.

Trolltech's syntactic extensions concern themselves with C++, so should
I start discussing their QT library here? How about POSIX, multithreading
libraries, RPC (of your choice), CORBA C++ bindings, compiler extensions,
build tools? C++/CLI is less interesting to me, and has no more standard
C++ content than the above.

Please stop posting about C++/CLI in this group.

Denis
Jul 22 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.