C++ run error...

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

Thread Status:
Not open for further replies.
  1. Confused++

    Confused++ New Member

    Joined:
    May 24, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I know I'm posting this forum twice, but I lost my original post and I didn't know there was a "Linux" forum.
    When I compile my program by typing...
    Code:
    g++ foo.cpp
    ...it compiles just fine and a little happy a.out file pops up. However, when I try to run the program...
    Code:
    ./a.out
    I get an error message along the lines of...
    Code:
    a.out: Permission denied
    I checked the permissions. They're normal: I can read, write, and execute; everyone else can read and execute; etc...
    I have the same problem with Perl programs as well, but I found that when I type...
    Code:
    perl foo.pl
    ...that seems to fix the problem. I'm just concerned about C++. Do I need a package that may be corrupted? Thanks in advance.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,336
    Likes Received:
    377
    Trophy Points:
    83
    You have posted it as an Article and so it went to Editorial review and your posts is moved into the forums. Duplicate of [thread=4416]Can't run C++ programs![/thread]. Thread closed.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice