-
April 9th, 2013, 07:36 AM
#31
Re: Can't intialize C++ Struct with CString in it??
Originally Posted by ADSOFT
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
-
April 9th, 2013, 07:39 AM
#32
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.
-
April 9th, 2013, 07:40 AM
#33
Re: Can't intialize C++ Struct with CString in it??
Originally Posted by ADSOFT
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
-
April 9th, 2013, 07:42 AM
#34
Re: Can't intialize C++ Struct with CString in it??
Originally Posted by ADSOFT
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
-
April 9th, 2013, 07:47 AM
#35
Re: Can't intialize C++ Struct with CString in it??
Originally Posted by ADSOFT
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
-
April 9th, 2013, 08:01 AM
#36
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.
-
April 9th, 2013, 08:06 AM
#37
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.
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
|