Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя sorbhs

Автор sorbhs, 11 лет назад, По-английски

hello , i am using MS c++ compiler here.Why we can't use ".h" in header files. And also,why we can't use cout,cin,endl like functions here?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
11 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Most headers with ".h" are just for C; C++ has its own equivalents (like cmath instead of math.h).

You can use cout, cin, endl. Maybe you're making some C-exclusive mistake (like not using namespace std).

  • »
    »
    11 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    thaanks... :)

  • »
    »
    11 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    can anyone tell how to remove error like runtime error(SIGSEGV)..

    • »
      »
      »
      11 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Segmentation fault. It usually appears when you're accessing elements out of bounds of some array (out of the memory allocated to your program).