View Single Post
  #5 (permalink)  
Old 07-19-2008, 06:26 PM
marwex89's Avatar   
marwex89 marwex89 is offline
Guru
 
Join Date: Jul 2008
Location: Viking-land!
Posts: 3,995
Credits: 0
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
Question Re: C++ system() not working!!?!? (Cygwin bash shell?)

Okay. This is (exactly) what my dear cmd.exe is telling me:

C:\C++\Projects\SysTest\dist\Debug\Cygwin-Windows>systest.exe
sh: PAUSE: command not found

C:\C++\Projects\SysTest\dist\Debug\Cygwin-Windows>


And this is a simple source code example:

Code:
//
// File:   sys_main.cc
// Author: me
// Date: Today
// Built to systest.exe

#include <cstdlib> // As usual
#include <cstdio> // As you mentioned...
#include <windows.h> // Why not..

using namespace std; // Probably smart

int main(int argc, char** argv)
{
    system("PAUSE");
    return (EXIT_SUCCESS);
}
Notice that I have NOT modified anything of importance. This is a basic NetBeans template for a c++ main function. I have NOT modified any compiler/linker options either. Try it and see...

One thing, though:
My TrendMicro PcCillin Antivirus reacts on my program, "Unknown software".
I just press "Allow" and restart. Disabling my AntiVirus does not help (I just tried).

What is happening???
__________________
Reply With Quote