The pressure-treated decks that went up with the Ballantyne, Blakeney, Providence and Piper Glen subdivisions between 1995 and 2005 are 20 to 30 years old. Most of them were nailed to the house, set on posts buried in the dirt, and railed with 2x2 pickets. None of that passes today.
Mecklenburg County issues the permit for any deck attached to the house or more than 30 inches off the ground, and the inspector visits three times: after the footings are dug, after the frame is up, and when the rails and stairs are finished. The checks follow North Carolina Residential Code Appendix M: ledger through-bolts instead of nails, lateral-load connectors into the floor joists, 12 inch footings below frost, post bases instead of buried posts, and a 36 inch guard with gaps under 4 inches.
When more than a third of the joists have gone soft, a rebuild on the old footprint usually costs less than the repairs, and the new frame is the one the next buyer's inspector will pass. Mecklenburg County Code Enforcement publishes the current permit rules and fees; the written quote lists them for your address.