dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 36

Thread: How to learn c++/cli?

  1. #1
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,877

    How to learn c++/cli?

    Would some C++/cli guru recommend a resource (preferably a book) for learning c++/cli for those of us with considerable c++ expertise but no .net knowledge.

    Thanks.

    PS Or do I mean C++/Win_RT? How do you tell if a C++ program is C++/cli or C++/Win_RT or even C++/CX???

    PPS Would some guru explain the difference between these various versions of c++ please? I'm getting confused as I'm coming from a pure c++ background. Thanks.
    Last edited by 2kaud; March 12th, 2019 at 08:01 AM. Reason: PS
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.3.5)

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,109

    Re: How to learn c++/cli?

    If you are trying to learn .net, I would recommend learning C# over C++/cli.

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,877

    Re: How to learn c++/cli?

    Well I think I now understand the various c++/xxx bits.

    c++/cli - managed c++ with language extensions that enable .net to be used

    c++/winrt - standard c++17 producing a Windows 10 UWP app mainly using c++ headers and one .dll

    c++/CX & WRL - Obsolete, replaced by c++/winrt

    We've looking to change our gui front-end programs to use a 'modern' design. All our expertise is with c++. Although the c++ code for these gui programs has been 'modernised', the underlying structure is still WIN32 API based (aka late 1990's!). Our 3 options are 1) do nothing and keep using WIN32. 2) re-develop using c++/cli 3) re-develop using c++/winrt.

    Although 1) (WIN32) is outdated, our gui developers understand it and the programs work across all versions of windows and are simple to deploy. This is the majority view but really it's a non-starter for the future.

    2) (c++/cli) means learning .net and producing managed code - but the programs will work across windows 7 & 10.

    3) (c++/winrt) means learning UWP et al and being restricted to Windows 10 as UWP apps only run on Windows 10. There is internal resistance to moving from current Windows 7 to Windows 10 (don't ask) but I guess we'll have to do it at some point in the not too distant future. This is my preferred option. However the documentation is not very good.

    With only c/c++/WIN32 knowledge, either of 2) or 3) is going to mean a massive learning curve. IMO c++/winrt route has more advantages in the future (not least of which is an upgrade from Windows 7 to Windows 10!).

    Hmmmmmmmm.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.3.5)

  4. #4
    Join Date
    Feb 2017
    Posts
    474

    Re: How to learn c++/cli?

    Quote Originally Posted by 2kaud View Post
    We've looking to change our gui front-end programs to use a 'modern' design. All our expertise is with c++. Although the c++ code for these gui programs has been 'modernised', the underlying structure is still WIN32 API based (aka late 1990's!). Our 3 options are 1) do nothing and keep using WIN32. 2) re-develop using c++/cli 3) re-develop using c++/winrt.
    There's a 4'th option and that's Qt.

    Qt is not just a GUI toolkit, it's a whole application framework, not as extensive as .NET and JVM but still. And it's native C++.
    Last edited by wolle; March 15th, 2019 at 09:41 PM.

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,877

    Re: How to learn c++/cli?

    Quote Originally Posted by wolle View Post
    There's a 4'th option and that's Qt.

    Qt is not just a GUI toolkit, it's a whole application framework, not as extensive as .NET and JVM but still. And it's native C++.
    Yeah - we know. It's been rejected. Please don't ask... Ahhhhhhhh. I'm tearing out the little hair that I've got left!
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.3.5)

  6. #6
    Join Date
    Feb 2017
    Posts
    474

    Re: How to learn c++/cli?

    Quote Originally Posted by 2kaud View Post
    It's been rejected.
    Then I agree. I would also prefer C++/WinRT.

    If there's a general consensus at the company to stick with Microsoft technology, then everybody should be able to accept that it's sensible to also take the road to the future recommended by Microsoft, and that's C++/WinRT.

    https://docs.microsoft.com/en-us/win...cpp-with-winrt

    To get detail info about C++/WinRT it's a good idea to google for Kenny Kerr because he invented it. Here's one,

    https://www.youtube.com/watch?v=nOFNc2uTmGs

    Kenny Kerr appears at 48:00.
    Last edited by wolle; March 17th, 2019 at 12:24 PM.

  7. #7
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,877

    Re: How to learn c++/cli?

    Quote Originally Posted by wolle View Post
    Then I agree. I would also prefer C++/WinRT.

    If there's a general consensus at the company to stick with Microsoft technology, then everybody should be able to accept that it's sensible to also take the road to the future recommended by Microsoft, and that's C++/WinRT.

    https://docs.microsoft.com/en-us/win...cpp-with-winrt

    To get detail info about C++/WinRT it's a good idea to google for Kenny Kerr because he invented it. Here's one,

    https://www.youtube.com/watch?v=nOFNc2uTmGs

    Kenny Kerr appears at 48:00.
    I agree. I've seen the MSDN docs and Kenny Kerr's web blog etc etc. IMO the documentation is very, very lacking and AFAIK there's no books yet that cover it. Just building the codeapps template program with no code changes wasn't exactly straightforward - and actually getting it to run outside of the VS IDE and on another WIN10 computer created all sorts of problems with missing .dll etc.

    If Microsoft wants C++/Winrt to be the future - and I agree that it's looking good - then they need to seriously pull their finger out and get the documentation sorted (particularly tutorials especially for those with just c/c++/WIN32) and some books written and published ASAP. The docs seem to assume you know about UWP, xaml etc etc. Nope!

    Ahhhhhhh!!!! Where's Petzold when you need him?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.3.5)

  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,109

    Re: How to learn c++/cli?

    Imo, MS docs have been severely lacking since they've gone to the blog/open source docs model.

    Docs are now on github and you can file bug reports, but there doesn't seem to be any schedule on when/if the docs will be improved.

    I file a doc bug on EventSource (kind of like event logging on steroids) for .Net Core. In .Net, the examples and docs were complete, but were inadequate for .Net Core. I filed the report last May and received a reply saying the docs would improved last Sept, but haven't seen anything yet.

    Looks like MS no longer pays technical writers to update the majority of the docs, so you get what you pay for.

    Years ago, a new venture like Win/RT would have been better covered SDK samples, several articles, etc. Now any articles you find are written from the point of view that you already know the material.

    This whole shift in how documentation is produced and maintained makes learning new technology a real chore.

  9. #9
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,877

    Re: How to learn c++/cli?

    Years ago, a new venture like Win/RT would have been better covered SDK samples, several articles, etc. Now any articles you find are written from the point of view that you already know the material.

    This whole shift in how documentation is produced and maintained makes learning new technology a real chore.
    Agree totally. MS really needs to get its act together. No wonder its lost so much ground on the client end. I hadn't realised until now how bad the doc was for their new technologies. They used to want to do what they could to support 3rd party development. Now it seems they go out of their way to discourage it.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.3.5)

  10. #10
    Join Date
    Apr 2019
    Posts
    1

    Re: How to learn c++/cli?

    Would suggest to learn languages that are currently hot in the market and are of demand even lately
    C++ is not scalable. Try learning C# which forms the core og the .Net framework. This will also be of help for you in terms of C++

  11. #11
    Join Date
    Feb 2017
    Posts
    474

    Re: How to learn c++/cli?

    Quote Originally Posted by JamieLanger View Post
    ..... learn languages that are currently hot in the market and are of demand even lately
    C++ is not scalable. Try learning C# .....
    In that case C++ is the better choice. At least according to the TIOBE index (April 2019),

    https://www.tiobe.com/tiobe-index/

    As you can see, C++ is far hotter than C#.

    C# isn't even hottest among the .NET languages anymore. This position is held by, surprise surprise, good old BASIC!

    Strange days indeed.
    Last edited by wolle; April 8th, 2019 at 11:07 PM.

  12. #12
    Join Date
    Apr 2019
    Posts
    4

    Re: How to learn c++/cli?

    I have checked TIOBE Index and I noticed that when clicking on the individual language you get a nice graph of its positions over time.
    It seems that C++ and C# have somewhat steady decrease while VB.NET has a large spiky increase in 2019.
    Do you know why that is?

  13. #13
    Join Date
    Feb 2017
    Posts
    474

    Re: How to learn c++/cli?

    Quote Originally Posted by Nountylegre View Post
    It seems that C++ and C# have somewhat steady decrease while VB.NET has a large spiky increase in 2019.
    Do you know why that is?
    C++ also has spiked, or at least recovered somewhat from the falling trend it shares with most major languages. I like to think it's the modernization effort in recent years that is finally paying off.

    Apart from the syntax, C# and VB.NET are almost identical so there must be something else. I have a feeling VB is used more when focus is on getting something done and the program is a means to that end, whereas C# is used more when the program itself is the objective and focus is on the development process. This could explain changes in popularity because over a business cycle not all sectors are in phase which means different kinds of programmers are in demand at different times and if they prefer different languages this is reflected in language popularity. But it's just a guess really.
    Last edited by wolle; April 18th, 2019 at 03:52 AM.

  14. #14
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,109

    Re: How to learn c++/cli?

    Quote Originally Posted by Nountylegre View Post
    I have checked TIOBE Index and I noticed that when clicking on the individual language you get a nice graph of its positions over time.
    It seems that C++ and C# have somewhat steady decrease while VB.NET has a large spiky increase in 2019.
    Do you know why that is?
    Just speculating here, but perhaps it's because all the VB6 programmers have just recently discovered VB.Net.

  15. #15
    John E is online now Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,546

    Re: How to learn c++/cli?

    Sorry for asking a dumb question - but how do I create an empty C++/CLI project to experiment with?

    In VS2019 I go to Create a New Project but it doesn't offer C++/CLI, If I drop down the Languages box I'll see various languages (C++ / C# / F# / Visual Basic etc) but there's no C++/CLI (not even as a subset of C++).

    I'm only using the Community Edition.
    "A problem well stated is a problem half solved. - Charles F. Kettering

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)