|
-
December 21st, 2010, 08:28 AM
#31
Re: Am I ready for C++ and MFC ?
 Originally Posted by Paul McKenzie
Doing 'C' things on these types usually results in undefined behaviour.
One possible next question may be:
"Hi Paul,
what you mean by undefined behaviour ?"
-
December 22nd, 2010, 12:39 AM
#32
Re: Am I ready for C++ and MFC ?
You never say what you plan to do with programming once you learn C or C++.
I used to program in C++, including managed C++, C, VisualBasic, Pascal, etc. Since C# came out I haven't bothered with C++. It's much easier to write Windows program in C# than in C++. Also, managed C++ is a very wierd form of C++, not at all standard.
IMO, the main reasons for using C++ are:
1. To support legacy programs.
2. To write low level code, like device drivers
and 3. To write code that is portable to other operating systems
-
December 22nd, 2010, 08:19 AM
#33
Re: Am I ready for C++ and MFC ?
4. when you need to control memory management.
5. when other dependencies are not acceptable e.g. .net
-
December 22nd, 2010, 08:27 AM
#34
Re: Am I ready for C++ and MFC ?
While it certainly is possible to have sources in a variety of languages and then link these into a single binary, personal experience in this matter would make me recommend avoiding this. It invariably causes a number of issues, especially if not everyone on the team is equally proficient in each of the languages.
If you have a project where several parts HAVE to be made in different languages, I would recommend making each of the languages build their own binary (DLL's) and use the defined exports of those. While it takes some more planning and setting up different projects at the start, it usually is much more convenient down the road.
-
December 22nd, 2010, 08:33 AM
#35
Re: Am I ready for C++ and MFC ?
As to why c++
6. When performance matters
7. When you have developed good libraries and follow some basic rules, C++ is just as easy to use as C# to write (windows) programs. The rules aren't necessarily a limitation. You can write "bad" programs in C# just as well.
8. When timely resource recuperation matters. (garbage collection is notoriously bad in this respect).
... to be continued ...
-
December 25th, 2010, 07:00 PM
#36
Re: Am I ready for C++ and MFC ?
Certainly those other items, 4 - 8, may justify using C++ instead of C#, but for most programs those considerations don't usually come into play. By the way, I'm really talking about writing Windows programs. For other OS's there may be other considerations.
I'm not sure that item 7, saying C++ is just as easy to use as C#, is true. Not having to worry about pointers, or that wierd caret notation, or making sure that you are really writing managed code, makes C# a lot easier to write.
Also, DanLeon /C++ for. Since he is just learning, if he wants to write Windows programs, C# is really the way to go.
-
December 26th, 2010, 07:53 AM
#37
Re: Am I ready for C++ and MFC ?
 Originally Posted by cgantz2000
Certainly those other items, 4 - 8, may justify using C++ instead of C#, but for most programs those considerations don't usually come into play. By the way, I'm really talking about writing Windows programs. For other OS's there may be other considerations.
I'm not sure that item 7, saying C++ is just as easy to use as C#, is true. Not having to worry about pointers, or that wierd caret notation, or making sure that you are really writing managed code, makes C# a lot easier to write.
Also, DanLeon /C++ for. Since he is just learning, if he wants to write Windows programs, C# is really the way to go.
they were reasons to use c++. The caret syntax is "Managed c++" and therefore not c++. Pointers are a non-issue with smart pointers, namely boost or maybe Qt, not std::auto_ptr. No one was talking about reasons to use managed, or suggesting that someone starting out should look into managed c++.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|