LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-05-2003, 08:43 PM   #1
estranged
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
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;   }
 
Old 09-05-2003, 09:34 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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
 
Old 09-06-2003, 11:20 AM   #3
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

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

Lyle
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in executing code in gcc gcc_learner Programming 3 03-26-2005 03:28 AM
executing shell code from stack djidji Fedora 3 03-07-2005 05:19 AM
Trying to install Lindows OS v4.5 - will not install due to error code 200 nygiants#1 Linspire/Freespire 5 11-10-2004 06:16 AM
java code executing SQL statements problem randomx Programming 1 11-09-2004 10:59 AM
Error USB-HUC on booting due in mdk10 due to mx700 Boudewijn Mandriva 4 10-09-2004 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration