I have studied Java and C# but want to get to know C++ as well and,
well, I am already confused. I am studying from Microsoft visual
C++.net (2003) and compiling on visual studio c++ express 2005.
when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
Is the 'S' deprecated? If so, has C++ changed that much between 2003
and 2005. I'm afraid to tackle 2008.
Maybe I should just stick with Java and C#
Thanks in advance.
DRG
.
|
|
| User: "Christopher" |
|
| Title: Re: New to C++ |
28 Jan 2008 12:09:32 AM |
|
|
"drg" <drg62@sbcglobal.net> wrote in message
news:DHcnj.41976$Pv2.37463@newssvr23.news.prodigy.net...
I have studied Java and C# but want to get to know C++ as well and, well, I
am already confused. I am studying from Microsoft visual C++.net (2003)
and compiling on visual studio c++ express 2005.
when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
Is the 'S' deprecated? If so, has C++ changed that much between 2003 and
2005. I'm afraid to tackle 2008.
Maybe I should just stick with Java and C#
Thanks in advance.
DRG
You are not using C++, but rather Microsoft's own "managed" C++ or C++.NET
language , which is a completely differant language altogether.
.
|
|
|
| User: "" |
|
| Title: Re: New to C++ |
28 Jan 2008 05:05:50 AM |
|
|
Thats visual basic, which can be embedded in C++ with the VC compiler.
You do have to set some option when compiling though. But since you
want to learn C++ you shouldn't use that :). I got my basics from
http://www.cplusplus.com/doc/tutorial/introduction.html and did the
tutorial of VC, which also includes how you can compile VB code in c++.
.
|
|
|
| User: "tragomaskhalos" |
|
| Title: Re: New to C++ |
28 Jan 2008 05:42:39 AM |
|
|
On Jan 28, 11:05=A0am, "michael.gooss...@gmail.com"
<michael.gooss...@gmail.com> wrote:
Thats visual basic, which can be embedded in C++ with the VC compiler.
You do have to set some option when compiling though. But since you
want to learn C++ you shouldn't use that :). I got my basics fromhttp://ww=
w.cplusplus.com/doc/tutorial/introduction.htmland did the
tutorial of VC, which also includes how you can compile VB code in c++.
I assume this is a joke (because it's complete nonsense), but really,
people have enough difficulty working out from Microsoft documentation
what's standard C++ and what are extensions | managed C++ | C++/CLI
without confusing them further.
.
|
|
|
|
|
|
| User: "Jerry Coffin" |
|
| Title: Re: New to C++ |
27 Jan 2008 10:28:46 PM |
|
|
In article <DHcnj.41976$Pv2.37463@newssvr23.news.prodigy.net>, drg62
@sbcglobal.net says...
I have studied Java and C# but want to get to know C++ as well and,
well, I am already confused. I am studying from Microsoft visual
C++.net (2003) and compiling on visual studio c++ express 2005.
when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
From the looks of things, you're not using C++ at all. Neither one of
these should compile.
Is the 'S' deprecated? If so, has C++ changed that much between 2003
and 2005. I'm afraid to tackle 2008.
My guess is that you're using what Microsoft calls C++/CLI. The name is
deceiving you -- your code is not really C++ at all.
Maybe I should just stick with Java and C#
Or with actual C++. The last time it changed was 2003, and you have to
be nearly an expert to find any of the changes that took place at that
time. The real C++ language hasn't changed enough to notice in over 10
years now. What you seem to be doing above would look something like:
std::cout << "Hello World"; in C++.
--
Later,
Jerry.
The universe is a figment of its own imagination.
.
|
|
|
| User: "pelio" |
|
| Title: Re: New to C++ |
29 Jan 2008 02:19:09 AM |
|
|
Jerry Coffin a écrit :
In article <DHcnj.41976$Pv2.37463@newssvr23.news.prodigy.net>, drg62
@sbcglobal.net says...
I have studied Java and C# but want to get to know C++ as well and,
well, I am already confused. I am studying from Microsoft visual
C++.net (2003) and compiling on visual studio c++ express 2005.
when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
From the looks of things, you're not using C++ at all. Neither one of
these should compile.
Is the 'S' deprecated? If so, has C++ changed that much between 2003
and 2005. I'm afraid to tackle 2008.
My guess is that you're using what Microsoft calls C++/CLI. The name is
deceiving you -- your code is not really C++ at all.
The line:
Console::WriteLine(L"Hello World")
is C++ - call of WriteLine static method in class Console with
declaration for example void WriteLine(const wchar_t *msg)
Maybe I should just stick with Java and C#
Or with actual C++. The last time it changed was 2003, and you have to
be nearly an expert to find any of the changes that took place at that
time. The real C++ language hasn't changed enough to notice in over 10
years now. What you seem to be doing above would look something like:
std::cout << "Hello World"; in C++.
.
|
|
|
| User: "Jerry Coffin" |
|
| Title: Re: New to C++ |
29 Jan 2008 08:45:33 AM |
|
|
In article <479ee17c$0$899$ba4acef3@news.orange.fr>,
says...
[ ... ]
The line:
Console::WriteLine(L"Hello World")
is C++ - call of WriteLine static method in class Console with
declaration for example void WriteLine(const wchar_t *msg)
It's certainly possible to write C++ that makes this legitimate. It's
equally certain that C++ doesn't support this right out of the box, so
to speak -- i.e. the standard library doesn't include a class named
Console with a member named WriteLine. Equally valid would be a
namespace named Console with a function named WriteLine -- but that's
not included in the C++ standard library either.
--
Later,
Jerry.
The universe is a figment of its own imagination.
.
|
|
|
|
|
| User: "drg" |
|
| Title: Re: New to C++ |
27 Jan 2008 10:43:25 PM |
|
|
Jerry Coffin wrote:
In article <DHcnj.41976$Pv2.37463@newssvr23.news.prodigy.net>, drg62
@sbcglobal.net says...
I have studied Java and C# but want to get to know C++ as well and,
well, I am already confused. I am studying from Microsoft visual
C++.net (2003) and compiling on visual studio c++ express 2005.
when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
From the looks of things, you're not using C++ at all. Neither one of
these should compile.
Is the 'S' deprecated? If so, has C++ changed that much between 2003
and 2005. I'm afraid to tackle 2008.
My guess is that you're using what Microsoft calls C++/CLI. The name is
deceiving you -- your code is not really C++ at all.
Ahhh -- you having said that made me look back to the previous chapter
where I was introduced to Managed Extensions for C++(MC++).
Thanks
Maybe I should just stick with Java and C#
Or with actual C++. The last time it changed was 2003, and you have to
be nearly an expert to find any of the changes that took place at that
time. The real C++ language hasn't changed enough to notice in over 10
years now. What you seem to be doing above would look something like:
std::cout << "Hello World"; in C++.
.
|
|
|
| User: "Bo Persson" |
|
| Title: Re: New to C++ |
28 Jan 2008 12:07:39 PM |
|
|
drg wrote:
Jerry Coffin wrote:
In article <DHcnj.41976$Pv2.37463@newssvr23.news.prodigy.net>,
drg62 @sbcglobal.net says...
I have studied Java and C# but want to get to know C++ as well
and, well, I am already confused. I am studying from Microsoft
visual C++.net (2003) and compiling on visual studio c++ express
2005. when I try to compile:
Console::WriteLine(S"Hello World")
I get an error.
If I compile:
Console::WriteLine(L"Hello World")
it is able to build.
From the looks of things, you're not using C++ at all. Neither one
of these should compile.
Is the 'S' deprecated? If so, has C++ changed that much between
2003 and 2005. I'm afraid to tackle 2008.
My guess is that you're using what Microsoft calls C++/CLI. The
name is deceiving you -- your code is not really C++ at all.
Ahhh -- you having said that made me look back to the previous
chapter where I was introduced to Managed Extensions for C++(MC++).
That's the first attempt, which wasn't very successful. C++/CLI is
another language, also invented by Microsoft.
The you have the real C++, the ISO standard C++ language. Visual
Studio will do that as well, if you just set the appropriate switches.
Bo Persson
.
|
|
|
|
|
|

|
Related Articles |
|
|