C++ Tutorial/Language Basics/comments — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:30, 25 мая 2010

C-style and C++ style comments

#include <iostream>
 
 int main()
 {
     /* this is a 
     c-style comment */
     
     std::cout << "Hello World!\n";
     // this c++-style comment ends at the end of the line
     std::cout << "That comment ended!";
     return 0;
 }
Hello World!
That comment ended!