A
A
Alex-Exsite2014-12-19 14:28:10
Programming
Alex-Exsite, 2014-12-19 14:28:10

How to define the input parameters of a function?

I can't figure out what input parameters to give to the "tor_main" function in order to run the program.
The listing of the function is presented in the main.c file. Link to sources: https://doxygen.torproject.org/main_8c_source.html (line 2937)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
lo-fi, 2014-12-19
@hrls

int main(int argc, char **argv) {
  tor_main(argc, argv);
}

well, or build with tor_main as the entry point instead of main

A
Alex-Exsite, 2014-12-19
@Alex-Exsite

I perfectly understand this, the question is what parameters to enter instead of argc and argv to start the program.

J
jarrus, 2014-12-21
@jarrus

Good afternoon. the argc and argv variables are essentially system variables.
argc is the number of startup parameters passed
argv are the actual parameters.
Example:
syst.exe -proc=main -var1=el1 -var2=el2
Here argc = 3
A argv if memory does not change an array of 3 elements {-proc=main, -var1=el1, -var2=el2}
B In your specific case, you will not receive a list of variables required to run, since they are processed as a result of the program, it would be better to read the manual for it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question