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. There are a 
number of IBM extensions but they are well-documented in the usual places and 
pretty straightforward. For example, in "regular" C you might write FILE myFile 
= fopen("C:/foo/bar.txt, "r"); while in MVS you might write FILE myfile = 
fopen("//SYS1.FOO.BAR(MYMEM)", "r, lrecl=80");

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."

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Steve Beaver
Sent: Monday, May 29, 2017 1:32 PM
To: [email protected]
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 [email protected] with the message: INFO IBM-MAIN

Reply via email to