mmmm....I have a real quick question I hope someone can answer within an hour and a half....heh....here's the thing......
We need to create a way to put our code into "silent mode"....if the user passes a "q" to the program through the command line, then none of the printf's need to be shown....only the scanf's......it's supposed to show nothing except when they choose to "PRINT" the records.....so I figured the easy way to do it would be like this:
something of the nature....put a check to see if it has been flagged as silent...problem is I can't get my char *argv working...at the very beginning of the program i'm trying something like:Code:int silent=0; if (silent=1) { printf("a bunch of junk"); } scanf("%c",&character);
but that's not setting it equal to one...or something isn't going right....can someone tell me how to make this successfully set to 1 if the user passes a 'q'? thanks.Code:if (char *argv[1]=='q') { silent = 1; }