O'Reilly logo

C++ 2013 for C# Developers,Second Edition by Dean C. Wills

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 1

image

Hello, World

Consistency is the last refuge of the unimaginative.

—Oscar Wilde

Since time immemorial, which pretty much dates back to the release of the Kernighan and Richie book on C, there has been a tradition of opening a book on C or its descendants with a short example of how easy it is to display “Hello World”. This book is no exception. Let’s examine the C# and C++ versions of “Hello World” side by side (see Table 1-1).

Table 1-1. “Hello World” in C# and C++

C#

C++

using System;class HelloWorld{   static void Main()   {     Console.WriteLine(“Hello World”);   }}

using namespace System;void main(){     Console::WriteLine(“Hello ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required