LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-06-2004, 08:06 PM   #1
saiz66
Member
 
Registered: Apr 2003
Posts: 225

Rep: Reputation: 30
[c] unix systems programming in MS VS C++?


Hi. I am doing unix systems programming and was wondering if it is possible to do it in Microsoft Visual C++. Everything should work.. except there is one problem.. reading in arguments... here is an easy program:

#include <stdio.h>

int main ( int argc, char ** argv )
{
int i;

printf ( "The number of arguments (argc) is %d.\n", argc );
printf ( "The contents of the argument vector (argv) is:\n" );

for ( i = 0; i < argc; i++ )
printf( "argv[ %d ] = %s\n", i, argv[ i ] );

return 0;
}

this just prints out all the arguments... in unix it runs perfect since it has a command line.. but how could i enter the arguments in vs c++?? I just like the vs c++ error detection better.. its easier for me to read and understand. Thanks!
 
Old 10-06-2004, 09:09 PM   #2
m00t00
Member
 
Registered: Sep 2004
Distribution: Slackware 10, Gentoo
Posts: 292

Rep: Reputation: 30
use a dos shell, and run it like you would a unix program
 
Old 10-07-2004, 08:16 AM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
The VC++ IDE has a place where you can put the command line arguments when you run it right from the IDE as well. The exact location of that depends on what version you are using, but it should be somewhere in the debugging options.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNIX Sound Systems TGWDNGHN General 3 11-22-2005 02:33 PM
Any good unix systems programming book? saiz66 Programming 7 10-04-2004 07:16 PM
unix systems programming in c saiz66 Programming 9 10-04-2004 10:04 AM
UNIX (Linux, BSD, etc) Programming :: UNIX kuphryn Programming 8 04-04-2004 11:50 PM
switching hard drives from different UNIX OS systems hopbalt Solaris / OpenSolaris 6 08-06-2003 01:48 PM


All times are GMT -5. The time now is 06:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration