473,398 Members | 2,212 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.

public keyword usage in managed c++

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
7 1659

"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
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
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
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
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
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

47
by: Andrey Tatarinov | last post by:
Hi. It would be great to be able to reverse usage/definition parts in haskell-way with "where" keyword. Since Python 3 would miss lambda, that would be extremly useful for creating readable...
12
by: Ioannis Vranos | last post by:
Just some thought on it, wanting to see any explanations. It was advised in this newsgroups that we should avoid the use of keyword register. However it is a language feature, and if it...
20
by: Philip Carnstam | last post by:
How come .Net applications use so much memory? Every application I compile uses at least 10 MB of memory, even the ones consisting of only a form and nothing else. If I minimize them though the...
5
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. ...
5
by: Alan Cobb | last post by:
Hi, In the managed C++ class below I get compile warning C4677 from VS2003. "signature of non-private function contains assembly private type", even though the managed enum is public. I have...
11
by: Paulo Eduardo | last post by:
Hi, All! We are developing one app for windows 95/98/Me/NT4.0/2000/XP/2003 using Visual C++ 6.0. We need to set the % of CPU Usage to app process. Is there an API to set % of CPU Usage? Can...
5
by: Sam | last post by:
Hi everyone Could anyone help me understand the usage of the "New" keyword I'm new to VB.Net. 1. Why do we use the "New" keyword on some object type variables such as the myPen of the...
10
by: =?Utf-8?B?TWlrZSBNY0FsbGlzdGVy?= | last post by:
I have a partial class of a UserControl coded as follows: public partial class Login : System.Windows.Controls.UserControl { public delegate void StartingLoginHandler(string message); public...
0
by: epoxyparser | last post by:
Hi all, I work as a glue coder and often have to interface existing mechanisms with other platforms. Creating bridge code between command-line functionality and desktop GUIs takes up a lot of that...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.