Electrical Engineering - Chapter 2: Getting Started

Rules for writing statements Semicolon serve as statement terminator Case sensitivity Blank spaces Spacing Accepted modifications

ppt14 trang | Chia sẻ: thuongdt324 | Lượt xem: 574 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Electrical Engineering - Chapter 2: Getting Started, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Chapter 2 – Getting StartedBasic Program Structure#include using namespace std;int main( ){ cout ...Creating New Lines in OutputProgrammer must specify new lineLine feeding\n in string constant cout using namespace std;int main ( );( cout OKusing namespace std;int main ( ){cout << “Hello world!”;cout << “Hello again”<< endl;// Next line will output a name!cout << “Sally Student”;/* Next line will output another name */cout << “John Senior” ;}SummaryGeneral program structureRules of C++ syntaxCreating comments and program bannersUsing escape sequences to format outputDebugging programsThree types of errors: syntax, run-time, logicChapter 2Learned about:
Tài liệu liên quan