How do I call a function in main ?

So I have the function declaration at the top for example
 
void read (string x [], string y [], int z []);

then I have the function definition at the bottom
and I am trying to call the function in main just by saying "read;" but it doesn't show anything so I feel like I am missing something so can you explain to me how to call functions in main?
Sorry I am new to C++
Thank you
In that tutorial it only shows how to do a void function with no parameters and I have parameters in mine so I still don't know what and how to put parameters in main
1. You clearly did not read the whole page.

2. What makes you think that a void function is significantly different from a value-returning function?
You could make it into a string.

string CHOOSE1();



Then inside of your main, you simply put cout << CHOOSE1(); which will take you to your function. Once the function is complete, it will take you back to the main.


Tell me if this helps. If not I have a few more ideas.
closed account (9GT54iN6)
write read();

put any of the strings inside of the () to use them.
also make sure you declare it in void at the top and void when your writeing out the inside of the function. you dont need void when your calling it though
Hm it still doesn't work i tried to do it this way
read(name1, name2);
but then it says that those were not declared and then i tried to declare them in main and it still gives me an error it says cannot convert or something like that...
Topic archived. No new replies allowed.