Please read the new rule regarding the restriction on the use of AI tools. ×

sorbhs's blog

By sorbhs, 11 years ago, In English

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?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it +1 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    thaanks... :)

  • »
    »
    11 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

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