LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem executing. This is not a due to code error :( (https://www.linuxquestions.org/questions/linux-software-2/problem-executing-this-is-not-a-due-to-code-error-89737/)

estranged 09-05-2003 08:43 PM

Problem executing. This is not a due to code error :(
 
I really want to stop using suse and make knoppix my main distro but i really need to make this work in order to do it.

It has to do with c++ and executing source code.
I type ./a.out and the shell just sits there. It doesnt hang it just sits there looking pretty.

I run the program with the ddd option and executed it from ddd...execution window comes up and nothing shows up.
I used anjuta same thing. No compiler errors no warnings but it wont execute.
Checked the permisions (chnod755) of the file and its execute..tried with no execute from desperation,....same crap.
And yeah i got make.



As I said, during compile, NO ERRORS and NO WARNINGS. I demoted my self to a simple hello world program just to keep things simple.



Code:

#include <iostream> using std::cout; using std::endl; using std::cin; int main () {  int x;  cin >>x;  cout<< x<<endl;    return 0;  }

neo77777 09-05-2003 09:34 PM

If you got no error messages during compile it desn't mean the program when executed will perform as you desire - try utilizing the usa of a debugger, for more info read up on gdb debugger - it comes with almost every if not all distros. http://tldp.org/HOWTO/Linux-Gamers-HOWTO/x400.html is a good tutrorial to start with

lyle_s 09-06-2003 11:20 AM

Your program is waiting for input at the line "cin >> x;". Have you tried typing in a number and pressing Enter?

Lyle


All times are GMT -5. The time now is 08:09 AM.