MS Developer help

This is a discussion on MS Developer help within the C Programming forums, part of the General Programming Boards category; I wanted to know how to provide arguments when using the MS Developer interface F5 runs the program with no ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    70

    MS Developer help

    I wanted to know how to provide arguments when using the MS Developer interface

    F5 runs the program with no arguments.


    CTRL + F5 does the same.

    also, if i placed a breakpoint when using the MS Developer environment, how can i use that breakpoint from the Command line interface.

    right now, it just wont see the breakpoint, it just drops right through.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Press F1, read the help.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    70
    i hit F1 on different windows
    and came with the following popup help
    Classview
    Text Editor Windows
    Output Window

    none of them mentioned anything about command line arguments.

    please can you tell me where to hit F1

  4. #4
    Welcome to the real world
    Join Date
    Feb 2004
    Posts
    50
    Breakpoints will only be "followed" if you run the executable within the IDE.

    Command line arguements can be added under Project ->Project Settings.

  5. #5
    Registered User
    Join Date
    May 2004
    Posts
    70
    in the project settings i can see
    general
    debug
    c/c++
    link
    resources
    browse info
    custom build
    pre-link step
    post-build step

    how can i put the command line arguments in there.
    or isthere some sort of check box which i need to check/uncheck?

  6. #6
    Welcome to the real world
    Join Date
    Feb 2004
    Posts
    50
    I bet you didn't even look...

    Project -> Project Settings ->Debug Tab ->General Category->Program Arguments

    Self explanatory from here.

  7. #7
    Registered User
    Join Date
    May 2004
    Posts
    70
    thanks dude
    i was lost in the tabs
    one more problem
    i wrote this code
    Code:
    #include <stdio.h>
    #include <conio.h>
    
    int main(int argc, char **argv)
    {
    	int i;
    	int numbers[10];
    	for(i=0;i<5;i++)
    		numbers[i]=10+i;
    
    	for(i=5;i<10;i++)
    		numbers[i]=i;
    
    	for(i=0;i<10;i++)
    		printf("%d ",numbers[i]);
    
    	for(i=0;i<argc;i++)
    		printf("\n%d	%s",i, argv[i]);
    	
    
    	if(argv[2] == "-a")
    		printf("Ascending");
    	else
    		printf("Descending");
    
    	getch();
    	return 0;
    }
    now i put the arguments -a -a -a in the project,-settings-debug-...

    but i can not get the Ascending message, instead i get the Descending message.

  8. #8
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>if(argv[2] == "-a")
    Lookup strcmp().
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  9. #9
    Registered User
    Join Date
    May 2004
    Posts
    70
    what's wrong with
    if(argv[2] == "-a")

    i will look up strcmp, thanks

  10. #10
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>what's wrong with
    Read the FAQ link
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  11. #11
    Registered User
    Join Date
    May 2004
    Posts
    70
    got it dude
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Speed test result
    By audinue in forum C Programming
    Replies: 4
    Last Post: 07-07-2008, 06:18 AM
  2. Heapsort
    By xENGINEERx in forum C Programming
    Replies: 2
    Last Post: 03-30-2008, 08:17 PM
  3. Generic heapsort
    By Sephiroth1109 in forum C Programming
    Replies: 15
    Last Post: 12-07-2007, 06:14 PM
  4. Need help with calculator program
    By Kate in forum C# Programming
    Replies: 1
    Last Post: 01-16-2004, 10:48 AM
  5. Ping
    By ZakkWylde969 in forum Tech Board
    Replies: 5
    Last Post: 09-23-2003, 01:28 PM

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