As you're posting this in the "New to handguns" area, I would assume that you are in fact, new to handguns. If such is true, I would strongly recommend the 9mm over either the .45 or .40S&W as far as "fist" handguns go in terms of center-fire pistols.
The 9mm typically has less felt recoil than either and costs less.
A lot of people that start with .40s and either A: Don't shoot enough. B: Don't seek out competent instruction. Or C: A&B end up developing very bad flinching issues with the .40 and when they move to something else, that flinch stays.
This is something I've been saying for years and I was quite happy to see a genuine professional state the same. As well as several other instructors I know of from various shooting backgrounds. Most of the professional instructors I know recommend the 9mm.
Now, as far as your two choices are concerned, I would opt for the .45.
But it really depends on what exact guns you're talking about. There are some guns I would prefer in .40, and others I would prefer in .45ACP.
Kahr - .40, preferably a K40
Sig - .45 in the P220 variants
Ruger - .45ACP in the SR1911
HK - .45 in the HK45 or 45C
Bersa - would have to go with a 9mm
Glock - .45 via the Glock 30SF
Colt - .45 (good luck trying to find a .40, they're out there but not easy to find)
I'd take a look at any "mid-size" 9mm.
Smith & Wesson M&P
HKP30, P2000, USPC
Try and find a range that has rentals, shoot a couple of models, find out what you like and don't like, then start looking at holster selection. Beware comments that include "Choose what feels best in your hand" or "I carry _____"
Just be an informed consumer, do your research including hands on, live fire testing of makes/models and stick the the major brands and you should be OK.