On 30/05/2017 5:18 AM, Charles Mills wrote:
Nearly any "Hello, world" program from the Web will run without modification on
z/OS, either as a UNIX command or as a conventional load module.
ftp://www.cs.uregina.ca/pub/class/cplusplus/CExample.html
z Linux is Linux, Linux, Linux. Nearly any Linux program should compile and run without
modification so long as it does not have "endian" dependencies.
I've got a lot of C++ code but the bulk of it is proprietary. I have some
trivial programs but they are no more illustrative than anything you could find
on the Web.
There are any number of C++ tutorials available. The IBM z C++ is totally
standard, albeit about six years behind the state of the art.
Indeed! only a subset of the C++11 standard has been implemented so far
and the other platforms already enjoy C++17 which is almost as succinct
as dynamic languages. At least we have type inference which Java doesn't
yet. Especially good for iterators to swerve the boiler plate declarations:
for ( auto it = m_map.begin(); it != m_map.end(); it++ ) ...
C++ can be a very complex language with some gnarly edge cases. But if
you master the fundamentals it it's an incredibly powerful language.
I learned Microsoft Visual C# which was easy -- great visual IDE -- and then taught
myself C++ from there. I think it was a good way to go. I learned true object-oriented
habits that way. Many people I fear claim they are writing C++ but in reality are writing
what I call "C with // comments."
I don't have a problem with using C++ as a better C. Some might use it
just for scope based resource acquisition or a safe string library. Not
everybody wants or needs OO abstractions. In a lot of modern C++ code
generic code (templates) with implicit interfaces is the way to go. I've
solved so many problems elegantly using templates that would have been
tedious using classic OO design with virtual functions and dynamic
dispatch.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of Steve Beaver
Sent: Monday, May 29, 2017 1:32 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Question about C++
Does anyone have a complete piece of C++ code that runs under MVS or Linux that
I can study? 99% of the stuff I write is HLASM and to a point I find C++
bewildering.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN