Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 07-20-2008, 09:50 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Are you running Unix or some other OS?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 07-20-2008, 10:03 PM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

WinXP SP2
Stable stuff, I thought..
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 07-20-2008, 10:11 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Have you tried running the commands in cmd.exe yourself? Like typing CLS and PAUSE? If it's a problem with cmd.exe then you need a new copy. Otherwise your program is sending the command to the wrong place (what is "sh" anyway?)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 07-20-2008, 10:18 PM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

My cmd.exe is fine, running batch files like never before...

I think "sh" is short for "shell", referring to the Cygwin Bash Shell which I think I've heard about.... I have no details...
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 07-20-2008, 10:58 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Odd...
I did a bit of Googling, and came upon what might be a solution. Try doing this:

Code:
system("cmd.exe /c cls");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #16 (permalink)  
Old 07-21-2008, 03:06 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,654
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

sh is actually the Bourne Shell, and later replaced by the Thompson Shell, and now is bash normally used, which is the Bourne-Again Shell, referring to the "Bourne" in the Bourne Shell, as "born".

Why do you use Cygwin anyway? It seems like you're normally not using it besides for programming. I would remove/uninstall it, and install a package called MingW instead. MingW is a port of the GNU Compiler Collection (GCC) and does only include the necessary stuff for programming like a compiler, assembler, linker, debugger, etc.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 07-21-2008, 10:25 AM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Sorry for late replay, I've been out farming

What the heck IS cygwin btw? I thought it was just a compiler variation of gnu, but obviously it's a lot more..

I have MingW and Dev-C++, but prefer NetBeans. I'll see if I can make them work together.

dargueta: I'll try

Thx to both of you for helping
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 07-21-2008, 10:37 AM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Sorry for double post.

dargueta: IT WORKED!

+rep for both for helping, and giving solution too....

But... we're not finished yet...

Why did it work? And what is Cygwin? (*To be continued..*)
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 07-21-2008, 11:25 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,421
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

Cygwin is an environment that runs within windows to give you access to *nix commands. The side effect of this is that when you are in Cygwin, you are NOT in Windows for all intents and purposes. While in Cygwin, you only have access to *nix commands, but do NOT have access to Windows commands. Cygwin is useful as it gives you the ability to run many programs that do not run on Windows for various reasons (such as lack of POSIX support).
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 07-21-2008, 11:30 AM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Rep Power: 30
marwex89 is a jewel in the roughmarwex89 is a jewel in the roughmarwex89 is a jewel in the rough
Send a message via AIM to marwex89
Default Re: C++ system() not working!!?!? (Cygwin bash shell?)

But... I don't need that... I just need the god**** GNU C++ compiler....

I got hold of the C/C++ NetBeans add-on. No compiler. So I checked the website, and was instructed to download the GNU C/C++ compiler from Cygwin (followed a link, I guess).

Is this Cygwin stuff just a lot of libraries I don't need, or is it some kind of active stuff which runs secretly on my computer...?
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Shell, using wget and awk? TIGA General Programming 0 04-11-2008 07:31 PM
[Pascal in Delphi]System to system Krad Pascal/Delphi 5 12-27-2007 02:35 PM
[PHP] Faking Shell Access Through PHP pranky PHP Tutorials 2 03-29-2007 07:28 AM


All times are GMT -5. The time now is 11:19 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads