CrazyEngineers
  • C++ on uBuntu : fatal error:library iostream.h not found

    Updated: Oct 26, 2024
    Views: 1.9K
    hi...when i write a simple hello c++ program and executed in ubuntu13.0 its showing fatal error:library iostream.h not found like dat..wen i tried to install g++compiler using apt get command its showing something like these packages are not existed..now what should i do???i want to execute c++ programs???can anyone tell what is the problem nd what i should do for it??
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Abhishek Rawal

    MemberApr 26, 2014

    That's because GNU GCC-C++ (aka g++) doesn't accept "iostream.h" syntax.
    Just use <iostream>
    Are you sure? This action cannot be undone.
    Cancel
  • madhuri thalluri

    MemberApr 26, 2014

    Abhishek Rawal
    That's because GNU GCC-C++ (aka g++) doesn't accept "iostream.h" syntax.
    Just use <iostream>
    sryy abhishek...i tried it..but its showing error that "cout is not in the scope of int main()"...
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Rawal

    MemberApr 27, 2014

    madhuri thalluri
    sryy abhishek...i tried it..but its showing error that "cout is not in the scope of int main()"...
    add this line
    using namespace std;
    below [HASHTAG]#include[/HASHTAG] <iostream>

    It should look something like
    #include <iostream>
    using namespace std;
    
    int main()
    {
    cout << "CrazyEngineers";
    }
    If this too fails, then you might've made some mistake in installing compiler.
    Re-installing libstdc++-dev and g++-multilib can fix it.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register