Make a class called 'employee', and then create a type-double variable as an object of that class called 'salary'. If you want to make the 'salary' variable private, which is generally a good idea, then you'll need to add a method to Get the salary variable from each employee declared, and then create a function that uses the Get method (declared in the employee class) to get all of the salaries, and then return the result to the caller.
It's been awhile since I've used C++, so if someone more advanced would like to call me on my bullshit, than I implore you to do so. I haven't too much confidence in my answer.

Alright. Once you've got some code, post it here. It doesn't have to function (lol computer puns). Even a simple skeleton outline will do, but something tangible that people can get their hands on is very much appealing to people who want to help.