C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-25-2004, 09:25 AM   #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.
studentc is offline   Reply With Quote
Old 05-25-2004, 09:26 AM   #2
+++ OK NO CARRIER
 
quzah's Avatar
 
Join Date: Oct 2001
Posts: 10,637
Press F1, read the help.

Quzah.
__________________
Hundreds of thousands of dipshits can't be wrong.


Are you up for the suck?
quzah is offline   Reply With Quote
Old 05-25-2004, 10:01 AM   #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
studentc is offline   Reply With Quote
Old 05-25-2004, 10:11 AM   #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.
OOPboredom is offline   Reply With Quote
Old 05-25-2004, 10:53 AM   #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?
studentc is offline   Reply With Quote
Old 05-25-2004, 10:56 AM   #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.
OOPboredom is offline   Reply With Quote
Old 05-25-2004, 02:33 PM   #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.
studentc is offline   Reply With Quote
Old 05-25-2004, 02:37 PM   #8
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
>>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]
Hammer is offline   Reply With Quote
Old 05-25-2004, 03:54 PM   #9
Registered User
 
Join Date: May 2004
Posts: 70
what's wrong with
if(argv[2] == "-a")

i will look up strcmp, thanks
studentc is offline   Reply With Quote
Old 05-25-2004, 04:14 PM   #10
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
>>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]
Hammer is offline   Reply With Quote
Old 05-26-2004, 01:54 AM   #11
Registered User
 
Join Date: May 2004
Posts: 70
got it dude
thanks
studentc is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 04:33 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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