Brackets.
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Brackets.

Hybrid View

  1. #1
    Join Date
    Dec 2013
    Posts
    3

    Brackets.

    Greetings From Dublin, Ireland,

    I am a novice(60) just learning the basics of VC++, the very basics. I have MS Visual Studio.NET 2003 on my seven year old HP Compaq Presario 1519UK and I set out to copy this project:

    http://msdn.microsoft.com/en-us/libr...(v=vs.90).aspx

    I tried to download Visual Studio Express a few years ago but it wouldn't install.
    All was going well until I went to Build>Build Solution after I had copied in the block of code to add the custom property to the control. I think I have followed the instructions to the letter but to start with I got a long list of build errors over 50. Then I put an open brace bracket just before the first statement like this:

    public:

    {

    property bool ClickAnywhere {
    bool get() {
    ...
    etc.

    }

    and so on and, of course, putting the closed brace bracket at the end of the block of code
    That open bracket that you can see above the first line of code reduces the number of build errors to only two: error code C2059 and another one C2334. I understand that that long list of errors are not really errors at all but a consequence of something I hope that's very simple but something key to the whole thing like my adding those brace brackets that improved everything greatly.
    What can I do to fix this so that I have no build errors? I have come close but not close enough.
    Is there now some fundamental difference between MS Visual Studio.NET 2003 and later versions of same?

    Regards,

    Peter Nolan.
    Dublin.
    Ireland.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    11,988

    Re: Brackets.

    This isn't the right forum for Windows Forms help, but without real code and without real errors, I doubt anybody can tell you much.

  3. #3
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    7,994

    Re: Brackets.

    [ Redirected thread ]
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  4. #4
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,571

    Re: Brackets.

    The sample code you're trying to compile is C++/CLI, which supersedes the now deprecated Managed Extensions for C++, AKA "the old syntax". However, the first version of Visual C++ that supported C++/CLI was 2005, so you can't compile that code with the version you're using.

    See http://en.wikipedia.org/wiki/C%2B%2B/CLI

    Although probably possible, you shouldn't attempt to port the sample code back to the old syntax. It is definitely deprecated (and quite ugly BTW) and should only used when maintaining legacy code that already exists written in that language. The most reasonable option you have is to get a newer version of VC++ that supports C++/CLI.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  5. #5
    Join Date
    Dec 2013
    Posts
    3

    Re: Brackets.

    Quote Originally Posted by Eri523 View Post
    The sample code you're trying to compile is C++/CLI, which supersedes the now deprecated Managed Extensions for C++, AKA "the old syntax". However, the first version of Visual C++ that supported C++/CLI was 2005, so you can't compile that code with the version you're using.

    See http://en.wikipedia.org/wiki/C%2B%2B/CLI

    Although probably possible, you shouldn't attempt to port the sample code back to the old syntax. It is definitely deprecated (and quite ugly BTW) and should only used when maintaining legacy code that already exists written in that language. The most reasonable option you have is to get a newer version of VC++ that supports C++/CLI.

    Hello Eri,

    Many thanks to you for replying to me. I appreciate this very much.
    I plan now to buy a few books on C++ and VC++.
    I was just hoping I could see the very basics from that walkthrough and I hope you won't be too shocked to read that it wasn't at all clear that this was a Windows Form Application. I am working my way through a book to learn more about VB.NET and the very next chapter that I am about to study is all about Windows Forms. I have so much to learn. I am a physicist by profession. Many thanks.

    Take care and stay safe,

    Peter Nolan. Ph.D.
    Dublin.
    Ireland.

  6. #6
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,571

    Re: Brackets.

    You're welcome.

    Be aware that, despite the similar name and similarities in coding, the "real" C++ (AKA native C++) and C++/CLI in fact are distinct languages. If you want to learn C++ and are not quite sure which of the two to use, chances are what you actually want/need to learn is native C++. The two most relevant forum sections regarding this on CodeGuru are Visual C++ Programming and C++ (Non Visual C++ Issues). The former is mostly about Windows programming using Visual C++ with the MFC framework. However, the Express Edition of VC++ does not feature MFC. The latter forum section is about almost anything else regarding the use of the C++ languare, Windows-related or not.

    If, OTOH, you want to do .NET development, you may use C++/CLI for that. It can be used as a general-purpose .NET programming language, but mostly it's used specifically for interfacing between .NET and native code, AKA interop. The usually preferred mainstream .NET languages are VB .NET, that you already mentioned, and C#.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  7. #7
    Join Date
    Dec 2013
    Posts
    3

    Re: Brackets.

    Quote Originally Posted by Eri523 View Post
    You're welcome.

    Be aware that, despite the similar name and similarities in coding, the "real" C++ (AKA native C++) and C++/CLI in fact are distinct languages. If you want to learn C++ and are not quite sure which of the two to use, chances are what you actually want/need to learn is native C++. The two most relevant forum sections regarding this on CodeGuru are Visual C++ Programming and C++ (Non Visual C++ Issues). The former is mostly about Windows programming using Visual C++ with the MFC framework. However, the Express Edition of VC++ does not feature MFC. The latter forum section is about almost anything else regarding the use of the C++ languare, Windows-related or not.

    If, OTOH, you want to do .NET development, you may use C++/CLI for that. It can be used as a general-purpose .NET programming language, but mostly it's used specifically for interfacing between .NET and native code, AKA interop. The usually preferred mainstream .NET languages are VB .NET, that you already mentioned, and C#.
    Hello Eri,

    Again many thanks to you. I am clear in my mind that I want to program in Visual C++ so this is the perfect forum for me and I am delighted to be now a member. However it will take me a little time to really get going. For one thing I will need a brand new PC and I really need some books for sure. I am still coming to grips with what a class is and what OOP is all about but I'm delighted to tell you that in this regard I am making progress, I found trying to understand OOP from pure text very hard and it wasn't till I saw a few sample programs that I was gradually able to get closer to the concept of a class. I got fantastic help from a friend of mine whom I've known for 40 years and he explained to me all about how the introduction of classes came into being. This development didn't happen overnight he explained. Very interesting. My friend has also a masters in computer science. I have sent both of your replies to him by email and we can discuss everything you said in greater depth.
    I think my friend will also have learned new things from your explanations.
    I hope I haven't caused too much confusion because as you know now I am a bit confused myself and you have been exceedingly generous to me, so patient.
    I wish you the very best.

    Regards,

    Peter Nolan.
    Templeogue
    Dublin 6W
    Ireland.

  8. #8
    Join Date
    Dec 2013
    Posts
    1

    Re: Brackets.

    i wanna see that post again

  9. #9
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,028

    Re: Brackets.

    Quote Originally Posted by rabi cs View Post
    i wanna see that post again

    ???
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center