home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jh6l+
- From: jh6l+@andrew.cmu.edu (Joseph A. Hollowood)
- Newsgroups: comp.sys.next.programmer
- Subject: Can I pass variables to system()?
- Message-ID: <secOX9200WB2EMBEpC@andrew.cmu.edu>
- Date: 30 Aug 92 21:06:17 GMT
- Article-I.D.: andrew.secOX9200WB2EMBEpC
- Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
- Lines: 15
-
- How can I make the following work?
-
- The user types in a month (int) and a year (int) and I
- pass those values to system("cal [month] [year]").
-
- Here's the code I was experimenting with, but it wasn't
- working...
-
- int theMonth = [inputFields intValueAt:0];
- int theYear = [inputFields intValueAt:1];
- system("cal $theMonth $theYear > /tmp/calOutputFile");
-
- Please email any replies to me personally.
-
- Joe
-