TAILIEUCHUNG - Lecture Programming in C++ - Chapter 2: Getting started

The main contents of this chapter include all of the following: Basic program structure, C++ syntax, creating a banner, sonnecting strings, character escape sequences, debugging, run-time errors, logic errors. | Chapter 2 – Getting Started Basic Program Structure #include using namespace std; int main( ) { cout using namespace std; int main( ) { cout . . . Creating New Lines in Output Programmer must specify new line Line feeding \n in string constant cout << “\nwe can jump\n\ntwo lines.”; Lesson endl manipulator cout << endl<<“we can jump “; cout << endl<< endl <<“two lines.”; we can jump two lines. Connecting Strings Can use backslash at end of line to indicate string constant to continue with next line Lesson cout << “This will \ continue on same line.” ; cout << “This will continue on same line.”; is equivalent to Character Escape Sequences Other escape sequences exist for formatting Full listing in Table Examples: \t horizontal tab \v vertical tab \% displays percent character \” displays double quote Lesson Debugging Error in program called bug Process of looking for and correcting bugs Three types of errors Syntax Run-time Logic Lesson Syntax Errors Mistakes by violating .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.