blob: b716c9069999402e0dc5435bda10dff193db5196 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// CST116-BlankConsole.cpp : This file contains the 'main' function. Program execution begins and ends there.
// Lloyd Crawford, CST 116 02, Lab0, IDE, Simple Program, Github
* 1 & 2 are to explain to the user who wrote this program and offer an indroduction. Line 2 is all the previous user's information.
#include <iostream>
#include "CST116-BlankConsole.h"
using std::cout;
using std::endl;
* Lines 5 through 8 are to start the coding and set parameters. Without #include <iostream>
and #include "CST116-BlankConsole.h", you get multiple error codes. They are not pretty. Same can be said for the other two lines.
int main()
{
cout << "Hello World!" << endl;
cout << "Hello I am Lloyd Crawford!" << endl;
cout << "My Github is 19-Ruin" << endl;
}
* This is the main coarse. int main() is the intro and required for the code to work.
{} you need these brackets in order to set the limits of what is being said by the program. now writing with cout is telling the program
"Pay attention, the next thing is what you say!". Then to make sure there are no extra errors you add << blah blah blah <<
The left facing arrows are the beginning and end of the message, like saying stop when using morse code since the period didnt exist.
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
*This final section is any useful tips a user might need. Sometimes more is better.
|