{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# C++的注释" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. 注释" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "① 在代码中的加一些说明和解释,这些说明和解释就叫注释。\n", "\n", "② 注释能方便自己和其他程序员阅读代码。\n", "\n", "③ C++的注释,有两种格式:\n", "\n", "1. 单行注释: // 描述信息 \n", " - note:通常放在一行代码的上方,或者一条语句的末尾,对该行代码说明。\n", "2. 多行注释: /* 描述信息 */ \n", " - note:编译器在编译代码时,会忽略注释的内容,即不会执行。" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.6.3", "language": "python", "name": "python3.6.3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.3" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": false, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": true } }, "nbformat": 4, "nbformat_minor": 4 }