TAILIEUCHUNG - A Complete Guide to Programming in C++ part 8

A Complete Guide to Programming in C++ part 8. This book provides both novice and experienced programmers with a comprehensive resource manual for the C++ programming language. Readers gain experience in all aspects of programming, from elementary language concepts to professional software development, with in depth coverage of all the language elements en route. These elements are carefully ordered to help the reader create useful programs every step of the way. | STANDARD HEADER FILES 49 The C standard library header files are shown opposite. They are not indicated by the file extension .h and contain all the declarations in their own namespace std. Namespaces will be introduced in a later chapter. For now it is sufficient to know that identifiers from other namespaces cannot be referred to directly. If you merely stipulate the directive Example include iostream the compiler would not be aware of the cin and cout streams. In order to use the identifiers of the std namespace globally you must add a using directive. Example include iostream include string using namespace std You can then use cin and cout without any additional syntax. The header file string has also been included. This makes the string class available and allows userfriendly string manipulations in C . The following pages contain further details on this topic. Header Files in the C Programming Language The header files standardized for the C programming language were adopted for the C standard and thus the complete functionality of the standard C libraries is available to C programs. Example include Mathematical functions are made available by this statement. The identifiers declared in C header files are globally visible. This can cause name conflicts in large programs. For this reason each C header file for example is accompanied in C by a second header file cname which declares the same identifiers in the std namespace. Including the file is thus equivalent to Example include cmath using namespace std The or cstring files must be included in programs that use standard functions to manipulate C strings. These header files grant access to the functionality of the C string library and are to be distinguished from the string header file that defines the string class. Each compiler offers additional header files for platform dependent functionalities. These may be graphics libraries or database interfaces. 50 CHAPTER 3 USING .

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.