If you set SIGCHLD to be ignored (or set the SA_NOCLDWAIT flag), child
processes that terminate won't turn into zombies, and therefore can't be
waited for individually. However, the semantics of wait and waitpid are then
changed: If there are no zombies (unwaited-for children that terminated
before SIGCHLD was set to be ignored), then the calls block until all
children have terminated, which is what you asked for.
However, you're new to this stuff, as you say, and what I just described
involves playing with signals, which I consider fairly advanced, so perhaps
you don't want to go this way. It's simpler, perhaps, to do what some others
have suggested and just keep track of the proceses you've created so you can
wait for them all.
"Advanced UNIX Programming" (published April 2004)