Skip to content

Instantly share code, notes, and snippets.

@ozkary
Last active May 1, 2022 19:19
Show Gist options
  • Save ozkary/debcd8c24ba6eb11ef9e44c8409ad0cf to your computer and use it in GitHub Desktop.
Save ozkary/debcd8c24ba6eb11ef9e44c8409ad0cf to your computer and use it in GitHub Desktop.
A simple hello world application using standard output.
/*
* Copyright 2022 ozkary.com
* http://ozkary.com/ by Oscar Garcia
* Licensed under the MIT license. Please see LICENSE for more information.
*
* helloworld.cpp
* Simple Console standard output and input string
* ver. 1.0.0
*
* Created By oscar garcia - ozkary
*
* Update/Fix History
* ogarcia 04/30/2022 initial implementation
*
*/
/**
* Import the standard console input output streams
* Add string data type support
**/
#include <iostream>
#include<string>
/**
* Bring the standard operations and data type into scope
* This help write std::cout to just cout in the code
**/
using std::cout;
using std::endl;
using std::string;
/**
* Main application entry point
*
* Use the following commands from the terminal to compile and run the code
*
* To compile use g++ ./filename.cpp -o appFilename
* To run use ./appFilename
*
**/
int main()
{
const string message = "Hello C++ World!";
// console output
cout << message << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment