The symbol "^"

  • Thread starter Thread starter Steve Behman
  • Start date Start date
S

Steve Behman

Where can I find a discussion of the operator (or is it a keyword?) "^"?

Doesn't have any relationship to the "&" in C++?
 
Hi Steve,
Where can I find a discussion of the operator (or is it a keyword?)
"^"?

I expect C++/CLI in the MSDN documentation for VC 2005/2008.
Doesn't have any relationship to the "&" in C++?

It is the C++/CLI equivalent of C++ *
C++ & "maps" to %
 
Hello again Sven,

Thank you very much.

My immersion into Visual C++ has been very much like going into a far too
hot sauna :-). I feel that I've been burnt at every turn. The learning curve
is very much steeper than any of the 50 odd other languages I have used.

I have searched MSDN at great length and came up empty-handed. Would you
please give me the URL for this discussion?

Thanks again,
 
Hi Steve,
My immersion into Visual C++ has been very much like going into a far
too hot sauna :-). I feel that I've been burnt at every turn. The
learning curve is very much steeper than any of the 50 odd other
languages I have used.

If you target the .Net framework it will be easier with C# or VB.Net.
C++/CLI makes most sense when bringing your existing C/C++ native code
and .Net together.
I have searched MSDN at great length and came up empty-handed. Would
you please give me the URL for this discussion?

Here you go:
http://msdn.microsoft.com/en-us/library/xey702bw.aspx
 
Steve said:
Hello again Sven,

Thank you very much.

My immersion into Visual C++ has been very much like going into a far too
hot sauna :-). I feel that I've been burnt at every turn. The learning curve
is very much steeper than any of the 50 odd other languages I have used.

I have searched MSDN at great length and came up empty-handed. Would you
please give me the URL for this discussion?

Hi Steve:

If you want to learn C++/CLI (or any language really) you need a book. An
introductory book that covers both C++/CLI (using WinForms) and standard C++
(using MFC) is Ivor Horton's Beginning Visual C++ 2008.

But, as I believe I have mentioned to you before, you should consider very
carefully if you really want to get into C++/CLI. If you want to write WinForms
applications, the effort required to do it using C# is much less than with
C++/CLI (even if you are familiar with standard C++). And there are things you
can do with C# that you cannot do with C++/CLI, because Microsoft has abandoned
the attempt make C++/CLI a first class .NET language.

Yes, C# is a new language for you. But so is C++/CLI. Note that it is not Visual
C++ that is giving you trouble, it is C++/CLI. Visual C++ is just a compiler and
IDE that can create programs for three languages: C, C++, and C++/CLI. The
majority of people using Visual C++ use it to create standard C++ programs
(mostly using MFC), just as they did 10 years ago with VC6.
 
David said:
And there are things you can do with C# that you cannot do with C++/CLI,
because Microsoft has abandoned the attempt make C++/CLI a first class
.NET language.
If you go that way, there are many more things you cannot do with C# that
you can do with C++/CLI. Like writing C++. :-)

It fully depends on what you mean by "first class". As far as the managed
bits go, they all compile down to CIL, after all, and they can all access
each other's types. Nothing prevents you from writing some parts in one
language and others in another; the assemblies are interchangeable.

C#/VB.NET have recently diverged some more. Even though new features were
added, I've heard VB pundits complain that VB isn't being treated as first
class either, because of C# feature X or Y that they're missing. In these
discussions, I think we can save ourselves some trouble by defining
"first-class language" as "C#"...

C++/CLI is arguably burdened enough by its double heritage as it is. Do you
really want to see it loaded down with even more? Is anyone waiting for LINQ
in C++/CLI, for example?

C++/CLI is good enough for its purpose: bringing the managed and unmanaged
worlds together as painlessly as possible. Using it for new .NET projects is
not a particularly good idea, but then, it never was.
 
David said:
Hi Steve:

If you want to learn C++/CLI (or any language really) you need a
book. An introductory book that covers both C++/CLI (using WinForms)
and standard C++ (using MFC) is Ivor Horton's Beginning Visual C++
2008.
But, as I believe I have mentioned to you before, you should consider
very carefully if you really want to get into C++/CLI. If you want to
write WinForms applications, the effort required to do it using C# is
much less than with C++/CLI (even if you are familiar with standard
C++). And there are things you can do with C# that you cannot do with
C++/CLI, because Microsoft has abandoned the attempt make C++/CLI a
first class .NET language.

I think we've discussed this at length before on thise newsgroup. C++/CLI
isn't a first class citizen of *Visual Studio* in that most of the .NET
wizards can't deal with it. The debugger slows down. But the language and
compiler itself is very well supported -- if you're willing to write code,
you can do anything with C++/CLI that is possible with C#.
 
Ben said:
I think we've discussed this at length before on thise newsgroup. C++/CLI
isn't a first class citizen of *Visual Studio* in that most of the .NET
wizards can't deal with it. The debugger slows down. But the language and
compiler itself is very well supported -- if you're willing to write code,
you can do anything with C++/CLI that is possible with C#.


Ben::

LINQ? Doesn't LINQ require partial classes?

I would not dream of suggesting that *you* should not use C++/CLI. But for the
great majority of people downloading Visual C++ Express, and finding that the
only way to write GUI programs with it is using Winforms, continuing in this
direction is not the way to go, IMHO.
 
David said:
Ben::

LINQ? Doesn't LINQ require partial classes?

That depends on what you consider LINQ to encompass. If you're talking
about the library parts then no, it doesn't require partial classes. If
you're talking about the full support in C# 3.0+ then it still doesn't
require partial classes, but it does require lambdas, automatic variable
types, anonymous classes, extension methods and the query syntax support.
There's lots of middle ground as well.

Can you use LINQ from C++/CLI? Almost certainly. Would you want to do so?
Almost certainly not.

-cd
 
C#/VB.NET have recently diverged some more. Even though new features were
added, I've heard VB pundits complain that VB isn't being treated as first
class either, because of C# feature X or Y that they're missing.

I think that there are also VB features that are missing in C#, for example
the embedded XML (I think C# does not have embedded XML support like
VB.NET).

However, it seems to me that there is a perception that C# is the "real"
..NET language. For example, lots of books about .NET topics (including
excellent WPF book by Adam Nathan) use C# as their .NET language to show
concepts and code.

Giovanni
 
However, it seems to me that there is a perception that C# is the "real"
.NET language. For example, lots of books about .NET topics (including
excellent WPF book by Adam Nathan) use C# as their .NET language to show
concepts and code.

I think it's mostly because C# doesn't use any C#-specific libraries
(in contrast to Microsoft.VisualBasic.* assemblies). Well, and
possibly also because most of the framework itself is written in C#,
so Microsoft, apparently, sees it as the right tool for platform
development.
 
Back
Top