If you are doing some big program, usually, how do you organize the files? Put the class and its member in head file, but where to declare non member functions and where to define them? I don't want to put them all in one cpp file. If not, how to make them visible to the main cpp file? thanks.
Generally, each class gets its own .h and .cpp file. Free functions are put into files according to their purpose and / or according to the classes they operate on.
If you have free functions which operate on a certain class only, it is said those free functions are part of the interface of those classes and thus you should define those free functions in the same .h and .cpp files as the class itself.
In a VERY LARGE class (like when I have to develop a complex Qt Widget with a lot of slots and functions) sometimes I split the .cpp context in more than one .cpp files (for example a .cpp file contains the class constructor, another file contains some functions, etc etc)