1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't run C++ programs!

Discussion in 'C++' started by Confused++, May 24, 2007.

  1. Confused++

    Confused++ New Member

    Joined:
    May 24, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    This problem is very frustrating. For non-Linux users, this may not make sence. When I compile a perfect program (one pre-made)...
    Code:
    g++ foo.cpp

    It compiles just fine and everything's happy because I have an a.out file. However, when I try to run the program...
    Code:
    ./a.out
    I get an error saying something along the lines of "foo.out: Permission Denied."
    When I check the permissions, everything seems okay. The owner is able to run it, write it, and read it; I own it. For extra measure I made the file executable for all users once again.
    Do I need a package for the ./ "command"? This happens in Perl, too, but then I just type "perl foo.pl" and it woks just fine.
    Thanks in advance.
     
  2. domain

    domain New Member

    Joined:
    May 1, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    I compiled many c++ programs in Fedora ( Linux ) for two years, but I have not see a problem like this ? you should ask in Linux Forums, I think you will get the answer there ..
     

Share This Page