Sounds like you are building a Modular Layout.
I have built a few of these. Normally what we do is use the Flex-Track for the main body of the track on each module. At least those points where the mainline is going to be un-interrupted by a turnout. Basically what we did was lay the Flex-Track and stop short 3-1/16 inches from the end of each module. This allowed a 1/32 gap at either end of a 6" piece of Atlas Track to bridge the gap between the modules.
This allowed the modules to be easily seperated, and it protected the track on the module from damage because the ends were 3 inches inset from the module ends.
I accomodate out loger engines the track was inset from the edge of the module 5 1/2 inches then 4 inches track center to track center for the mainline allowing the big-boy locos 2 inches of boiler swing on a 30" radius curve.
Keep that in mind too if you are building a double track mainline. You longest cars and engines are your minimum offset for the track centers.
If you are interested, NMRA has a pulished set of recommended standards for setting your track centers properly.
Just for the record that is 4 real inches, not HO Scale inches.
He He He He! :)
I am currently setting up my own layout in my house.
If you are going to do a modular setup, remember to jump your modules at each gap. This helps the current flow, and adds reliability to your layout.
Kalmbach Publishing has some really informative books and guides. Your local hobby-shop should have a pretty good selection. If not start a subscription to Model Railroader Magazine. I can tell you from experience! That was the best purchase I have ever made is to that Magazine!