Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22101

How do you add command line arguments for specific use to your terminal in Ubuntu? [duplicate]

$
0
0

I'm a bit confused as to how I could add certain parameters in the Ubuntu terminal when using the GNU C compiler to compile the program. For example:

gcc -o question question.c./question -e -f someFile.txt 

where -f would open this specific file 'someFile.txt' (any file) and -e would let me access a specific function inside my code.I tried this with void main(int argc, char* argv[]) but with that I would have to specify the number of arguments I would have to pass i.e. ./question 3 -e -f resources.txt, which I would not like to do.
Is there any other way I could attempt this?Thank you in advance!!!


Viewing all articles
Browse latest Browse all 22101

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>