SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Learning C++

rated by 0 users
This post has 57 Replies | 0 Followers

Top 10 Contributor
Posts 1,626
Firedancer Posted: 09-27-2004 1:54 PM
Hi Guys,

I've just signed up to learn some C++. Any advice ah? [8-|]
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 10 Contributor
Posts 1,221
All I can say is, good luck with pointers and memory management and leak detection.

If you need any help with c++, you can always approach me. I've been programming with C++ for quite a long time.
Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Top 25 Contributor
Posts 330
I think you should start from STL directly...embed STL concept from the first day...

http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-17.html
blackinkbottle "please polish my crude soul", to the maker of blade the Samurai kneed down and said.
Top 10 Contributor
Posts 1,626
 blackinkbottle wrote:
I think you should start from STL directly...embed STL concept from the first day...


Er...I still have not learned how to crawl yet ... you want me to learn how to fly already ah?[8-|]
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 10 Contributor
Posts 1,221
Language is always the same. STL is like your .Net Framework Libraries, except much more... erm... difficult and powerful.

A few advise are to know your design patterns, learn your STL, worry about memory leaks, and templates are your best friend and worst enemy.

Smile Cheers.
Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Top 50 Contributor
Posts 81
Hehehe........if you wanna learn programming for embedded systems with C/C++.....well you can ask me too.

Been working on embedded systems for 2 years already.
thanks & regards e_har
Top 25 Contributor
Posts 330

Be warned embedded c/c++ is a very different species... Smile

Scheduling, FSM, concurrency synchronization, numerical stability would be the top priority of that field and defensive programming is the first thing.

e_har, correct me if i am wrong. Stick out tongue

blackinkbottle "please polish my crude soul", to the maker of blade the Samurai kneed down and said.
Top 10 Contributor
Posts 1,626
 blackinkbottle wrote:
Be warned embedded c/c++ is a very different species... Smile


Whoa... I think I better start with Hello-Worlds first. Tongue Tied
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 150 Contributor
Posts 9
Do not start learning C++ from microsoft C++.NET. Instead, start with Ansi C++.

C++.NET is an adopted version (limited version) of C++ meant for development with .NET. For example,

1.There is no Standard Template Library in C++.NET
2.You cannot do pointer arithematic in C++.NET and other memory manipulation stuff.
3.There is no multi-heritance in C++.NET
4. There is no generic C++ templates concept in C++.NET

list of books recommended.

Teach Yourself C++ in 21 days  - Jessy Liberty
More C++ programming in 21 days - Jessy Liberty
Effective C++ - Scott Meyers
More Effective C++ - Scott Meyers
C++ Effective Object-Oriented Software Construction - Kayshav Dattatri

Once you mastered ansi C++, you would inherit a very strong foundation in software design. you can then develop in any platform, and be able to master just about any other languages.

The road you are taking is long and hard, BUT very rewarding and worthwhile. Do not give up!

km***
Top 10 Contributor
Posts 1,626
 km*** wrote:
Do not start learning C++ from microsoft C++.NET. Instead, start with Ansi C++.


Aiks! I need to check the course offering then to see whether it is C++ or it is C++.NET. [*-)]

 km*** wrote:
Teach Yourself C++ in 21 days  - Jessy Liberty


I think I got this somewhere on my shelf. Will need to dig it up again to read it. [8-|]

 km*** wrote:
The road you are taking is long and hard, BUT very rewarding and worthwhile. Do not give up!


Yeah I know Crying
Software development made easy with Paladin RAD Framework. Save some trees, use Stickies.NET
Top 25 Contributor
Posts 330
 km*** wrote:


C++.NET is an adopted version (limited version) of C++ meant for development with .NET. For example,

1.There is no Standard Template Library in C++.NET
2.You cannot do pointer arithematic in C++.NET and other memory manipulation stuff.
3.There is no multi-heritance in C++.NET
4. There is no generic C++ templates concept in C++.NET



This is plain wrong. Surprisingly, there is no language called C++.NET! By C++.NET you are refering to VS C++.NET, which is the IDE designed for C, C++, Managed Extensions for C++ (in VS 2002, VS2003), and C++/CLI (VS 2005).

You can do all your C/C++ stuff within the VS C++.NET IDE, including microsoft's implementation  of STL, as STL is part of the C++ standard. Though this does not prevent your from using the third-party STL library implmentation such as STLport.

So from within VS C++.NET IDE there is no prob for you to do 1 2 3 and 4 in the above. VS 2003 is also v7 compared to Visual C++ 6, and is considered a improved version, esp in terms standard conformance of the compiler.

In addition, you get the access to NET runtime libraray. But in view of upcoming C++/CLI, I would think it is better to stay sideline for that, since Microsoft themselves are thinking "mmm.. that is not very nice, let us change it...". Indeed C++/CLI shows sign of great cleanup.

But anyway, if you can use VS C++.NET IDE to complie all the boost, blitz, loki community libraries, it is good enough already right!?

So when I say, starting with STL is a important step to tap the power of C++ esp the existing libarary. Of course, it could be better after you are comfortable with the C++ paradigm and  appreciate the power of control it offers.

blackinkbottle "please polish my crude soul", to the maker of blade the Samurai kneed down and said.
Top 75 Contributor
Posts 38
my say.....

make sure u know the difference between Ansi C++ and Ms's VC++. Start wif the standard language thingy and dont touch Ms's specific implementation first. Ansi C++ should be more or less what is needed for academic purposes. Then in real life only u get dirty wif stuff like MFC, STL, ATL, COM using VC++.
Top 10 Contributor
Posts 1,221
C++.Net is C++ with .Net language extensions. That's what we usually mean.
Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Top 75 Contributor
Posts 29

There are a few terms about C++ in Microsoft world that are really confusing the C++ new comers:

·        The term MS C++ (or Microsoft C++), and also unmanaged C++ (since .NET), refers to the same thing – ANSI C++ standard with some Microsoft-specific extension/changes. Sometime it is referred to as “traditional C++” by .NET developers.

·        Then the term Managed Extensions for C++ (or simply managed C++), which extends the “traditional” C++ to support .NET framework. It is called “managed” because your executable code is managed by the .NET runtime, which provides you with several great features, such as automatic memory management. On the other hand, traditional C++ code is managed by itself, and is run with its own risks of memory corruptions. Hence the name unmanaged C++. Both Visual C++ .NET 2002 & 2003 allow you to develop managed and unmanaged C++ code. The next version of managed C++ is coming and is called C++/CLI. You need to be aware of this if you are starting a new Managed C++ project. There are some language syntax changes.

·        The term C++ .NET, I believe that it should refer to Visual C++ .NET. However, not all of C++ developers are using Visual C++ .NET for development. They have their own favorite editors to write code. Those C++ developers sometimes might say that they are developing applications in “C++ .NET”. I guess what they really mean is “C++ over .NET” or “non-traditional C++ on .NET”. What they mean should be “managed C++. They are developing in C++ and target the .NET runtime. You can play with managed C++ with the command-line compilation using this kit http://msdn.microsoft.com/visualc/vctoolkit2003/.

 

Then where do you start to pick up C++? I would ask you a question first. How would you see yourself in the next two or three years as a software developer? If you are doing your works in C++ on .NET, then managed C++ is the only way out. But be aware, when you define a managed type, though you get full access to the .NET runtime features, at the same time you lose some traditional C++ features for that type. Myself do not have a good feeling to suggest a new C++ learner to start with managed C++. For long run investment in C++ and .NET, the learning steps shall start with ANSI C++, then the concepts of .NET, and then managed C++ or C++/CLI.

 

Shawn

Top 10 Contributor
Posts 1,221
Ok. What I suggest is that you must already be familiar with the vanilla C++ and all it's concepts before picking up Visual C++.NET.

Visual C++.NET is basically worked exactly the same with the exception of CLI extensions (which I suggest you should learn instead of managed C++). With the upcoming STL.NET which hasn't been officially announced, or rather still quite quiet, you gain the functionalities of the STL on the .NET platform/framework. That should be the long term investment.

Ultimately where I see Visual C++.NET in the entire .NET platform/framework picture is it's ability to create very powerful low-medium-high-ultrahigh level applications, all in the same language. Interoperability will be the extreme.

I might be doing some teaching/presentation on C++.NET, covering both managed and CLI sometime next year, to show everyone the powers of what C++.NET can do, with regards to old traditional vanilla C++ together with the powers of .NET Framework. Let's put it this way. Vanilla C++ is like the Java Language, and .NET Framework is a godsent Java 2 Platform API Specification for Vanilla C++. Where would you find such a comprehensive platform API for C++? Yes, there are bits and pieces that you can piece together, but as a complete platform package?
Regards, triplez ------------------------------ http://triplez.mine.nu/blogs
Page 1 of 4 (58 items) 1 2 3 4 Next > | RSS
Copyright SgDotNet 2004-2009
Powered by Community Server (Commercial Edition), by Telligent Systems