|
Stdnet2 now offers Java-like programming in C++ for Windows and Linux.
Here's an example:
using stdbase::system::String; using stdbase::system::StringRef; using stdbase::system::ObjectRef; using stdbase::io::FileOutputStream; using stdbase::io::FileOutputStreamRef; using stdbase::io::PrintStream; using stdbase::io::PrintStreamRef; using stdbase::system::platform::FileDescriptor; int main( int argc, char *argv[] ) { FileOutputStreamRef fos = FileOutputStream::create( FileDescriptor::stdoutFileDescriptor ); PrintStreamRef pstream = PrintStream::create( ref_cast<OutputStreaam>(fos) ); StringRef aha = String::create("Well, the PrintStream works!"); StringRef foo = "Trying string literal"; pstream-> println( foo + 99 ); pstream-> println( aha + foo + " yeah! " + 5); pstream-> println( "Of course, I knew it would."); pstream-> println( 5 ); return 0; }