![]() |
| | #1 |
| Registered User Join Date: May 2004
Posts: 70
| MS Developer help 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 | |
| | #2 |
| +++ OK NO CARRIER 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 | |
| | #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 | |
| | #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 | |
| | #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 | |
| | #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 | |
| | #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;
}
but i can not get the Ascending message, instead i get the Descending message. |
| studentc is offline | |
| | #8 |
| End Of Line Join Date: Apr 2002
Posts: 6,240
|
__________________ When all else fails, read the instructions. If you're posting code, use code tags: [code] /* insert code here */ [/code] |
| Hammer is offline | |
| | #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 | |
| | #10 |
| End Of Line 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 | |
| | #11 |
| Registered User Join Date: May 2004
Posts: 70
| got it dude thanks |
| studentc is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
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 |