COSC-051 Lecture Notes - Lecture 3: Newline, Integer Literal, Standard Streams
Document Summary
Line 1: the forward slashes denote a comment; the computer does not read this, as it is for human reading. It has no meaning to the c++ program. The endpoint of the comment is the end of the line. (in a special case) \* denotes the beginning of a comment that will reach on for many lines. Line 2: this is the preprocessor directive and is not part of a c++ program. If you want to add streams in your program, you must include iostream. It uses can and cost for sending data to and fro the standard streams input and output respectively. Line 3: this is a statement that is part of the c++ program. A namespace is a key word, and std is short for standard. the built in c++ library routines are kept in the standard namespace, which includes stuff like cout, cin, string, map, etc. Line 4: this is the beginning of the function named main.