Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1792)

Unified Diff: base/cpp101/hello_world.cc

Issue 2733293003: (DO NOT LAND) Example GN solution for C++ 101 Exercise 0 (Hello world). (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/cpp101/hello_world.cc
diff --git a/base/cpp101/hello_world.cc b/base/cpp101/hello_world.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2f48af9250e4a1abe5d59a0685ffcb3f2dfb764d
--- /dev/null
+++ b/base/cpp101/hello_world.cc
@@ -0,0 +1,14 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <iostream>
+
+#include "base/logging.h"
+
+int main(int argc, char* argv[]) {
+ std::cout << "Hello, world!" << std::endl;
+
+ // Use of LOG is more common than raw std::cout.
+ LOG(INFO) << "Hello, logging!";
+}
« no previous file with comments | « base/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698