Can't intialize C++ Struct with CString in it?? - Page 3
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 3 FirstFirst 123
Results 31 to 37 of 37

Thread: Can't intialize C++ Struct with CString in it??

  1. #31
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Can't intialize C++ Struct with CString in it??

    Quote Originally Posted by ADSOFT View Post
    Igor and Victor,

    It's starting to look like the compiler V6.0 , lol.
    First and foremost, VC 6.0 is not an ANSI C++ compiler. The answers that were given to you earlier assumed you were using an ANSI C++ compiler, such as later versions of Visual C++. In VC 6.0, perfectly valid ANSI C++ code will fail to compile, and also, invalid ANSI C++ code will compile on that old compiler.

    Next time, you need to mention the exact compiler you're using.

    Regards,

    Paul McKenzie

  2. #32
    Join Date
    Jun 2004
    Posts
    1,329

    Re: Can't intialize C++ Struct with CString in it??

    Paul,


    So why did it compile on Victor's V6.0 ?
    Rate this post if it helped you.

  3. #33
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Can't intialize C++ Struct with CString in it??

    Quote Originally Posted by ADSOFT View Post
    Victor tried the ctor (copied your code directly) same compiler message ?:




    ?? maybe you updated your V6.0 sdk, on this computer it's not updated?


    strange?
    The bottom line is that VC 6.0 is not an ANSI C++ compiler. It has nothing to do with the SDK.

    The C++ language was standardized in 1998. This is after VC 6.0 came out. So you have a computer language, C++, that was finally standardized after the compiler you're using was created. Do you see a problem with that? The obvious problem is that the C++ language contains rules that never made it into the VC 6.0, and one of those rules is construction inside an initialization.

    Regards,

    Paul McKenzie

  4. #34
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Can't intialize C++ Struct with CString in it??

    Quote Originally Posted by ADSOFT View Post
    Paul,


    So why did it compile on Victor's V6.0 ?
    Service packs.

    My main point is that you were getting upset when the ones helping you had no idea you were using an outdated compiler.

    Regards,

    Paul McKenzie

  5. #35
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,390

    Re: Can't intialize C++ Struct with CString in it??

    Quote Originally Posted by ADSOFT View Post
    Victor tried the ctor (copied your code directly) same compiler message ?:




    ?? maybe you updated your V6.0 sdk, on this computer it's not updated?


    strange?
    Well, my VC++6.0 has SP6 installed.
    Besides there is also PSDK from February 2003.

    So I cannot test on the "clean" VC++6.0
    Victor Nijegorodov

  6. #36
    Join Date
    Jun 2004
    Posts
    1,329

    Re: Can't intialize C++ Struct with CString in it??

    Well, I'm glad we got to the bottom of it. I knew there was a logical explination.

    It explains why just about every contruction I tried of the CString didn't work, lol.

    Thanks to everyone for all the help.


    Sorry to see VS6.0 take one in the shorts, but then again for pre ANSI it did a gr8 job.
    Rate this post if it helped you.

  7. #37
    Join Date
    Jun 2004
    Posts
    1,329

    Re: Can't intialize C++ Struct with CString in it??

    Victor I agree.

    Thanks for help, what can you do, Pre-Ansi, that's a tough one to deal with, but it a wierd way it was fun figuring it out.


    Thanks again.
    Rate this post if it helped you.

Page 3 of 3 FirstFirst 123

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

This is a CodeGuru survey question.


Featured


HTML5 Development Center