Modularity is one on the important parameters to evaluate the community structure of network. The community structure of small-world networks (Watts-Strogatz model) and scale-free networks (Barabàsi-Albert model) were explored in the framework of the modularity using numerical simulations. We found that, firstly, the community structure in Watts' small-world networks is clear, while in Barabàsi's scale-free networks it is unclear; secondly, community structure is affected by the density of the network, namely, the sparser the network connections, the clearer is the community structure; thirdly, modularity in Watts' small-world networks is a dynamic variable which changes as a nonmonotonic function of the probability of rewiring connections. Hence, community structure should be one of the complex network properties. The real social networks may exhibit clear community structure, small-world phenomena and scale-free properties simultaneously. None of the current network models, such as the random network, Watts-Strogatz model, or Barabsi-Albert model, fits these social networks very well. A new social network structure is pending construction.