简体   繁体   中英

How to run C program in Visual Studio with "parameters"

I'm not sure if "parameters" is the correct term, but I don't know what else to put. I have a C program that displays "Hello World!"in the terminal when I run it. But I have to follow specific steps before I run it. Assuming I am in the correct directory, I first must compile the .c file. In the terminal I type,

gcc -Wall -std=c99 hello_world.c

then to run the program, I type

./a.out

My question is, how do I run that .c file in Visual studios while using the "gcc -Wall -std=c99". To be honest, I have no ides what "gcc -Wall -std=c99" does exactly, but I have to use it.

gcc -Wall -std=c99 compiles the c file with the c99 standard. I don't know what your exact question is here, but to run both in one command you would need to do: gcc -Wall -std=c99 && ./a.out

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM