1
I’ve always used the main function as follows, creating other functions:
int main() {
.
.
.
return 0;
}
How the inputs to the main function work?
int main(int argc, char **argv){
We have a variable and a char, right? So, I have to provide these values before running the program, correct?
Could shell run the following line, for example:
./bin/programa -e ./data/entrada.txt -s ./data/saida.net
Correct?
@Guilhermebrügger That’s right, I put that it was whole but I didn’t explain what it was! Thanks!
– prmottajr
Got it! And the values (int for argc and char for argv) are saved in these "variables"? Can I use them in the function, correct?
– Klel
@Klel can use yes. If you think the answer helped you can accept it as a solution. It helps people who respond :)
– prmottajr