Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-06-2004, 09:06 PM   #1
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, 10:09 PM   #2
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, 09:16 AM   #3
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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.


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

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

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration