Jos Timanta Tarigan wrote:
> Hi, 
>
> Im curious is it usual to make an util class to contain methods that are 
> going to be used frequently generally? is there any proper format for this 
> class? im planning to make a util.cpp file with some methods, and include the 
> cpp file in every classes. but i wonder since i havent seen an included .cpp 
> files(all included are header files)
>   

What you are looking for is a class that has only static methods. 
However, the bigger question is why are you using a class when you can 
just make stand-alone functions? If you want to group them you can use a 
namespace. This has the advantage of being extensible, in that you can 
put other stuff in the namespace later while to extend a class you get 
into types and junk that are not important for a utility class.

-- 
John Gaughan

Reply via email to