Using System on other consoles

This is a discussion on Using System on other consoles within the C++ Programming forums, part of the General Programming Boards category; Hi! If I create a program on Windows and I use the System function in my code, If I use ...

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    1

    Using System on other consoles

    Hi!
    If I create a program on Windows and I use the System function in my code, If I use it on a different OS, will the program ignore the system function and keep running, or will the whole program stop straight out?

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,528
    Quote Originally Posted by Dasttann777 View Post
    Hi!
    If I create a program on Windows and I use the System function in my code, If I use it on a different OS, will the program ignore the system function and keep running, or will the whole program stop straight out?
    All other systems have different shells than windows. So the shell will just print something similar to "Command not Found" and continue.
    If however, the command does something different, you are in danger!
    So don't use system() for a portable program.
    Manasij Mukherjee | gcc-4.9.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do you create two consoles with one program?
    By edomingox in forum Game Programming
    Replies: 2
    Last Post: 11-16-2010, 06:18 PM
  2. Question on Consoles
    By Dark_Phoenix in forum C++ Programming
    Replies: 8
    Last Post: 02-03-2008, 05:42 PM
  3. New system
    By VirtualAce in forum Tech Board
    Replies: 13
    Last Post: 01-23-2008, 12:10 AM
  4. Cannot convert system object to system string?
    By Robert_Sitter in forum Windows Programming
    Replies: 0
    Last Post: 11-18-2005, 02:44 PM
  5. ystem commands for consoles
    By DarkViper in forum C++ Programming
    Replies: 5
    Last Post: 10-31-2002, 11:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21