Home
Main Menu
Home
Help Docs
Newbies
Corporates
Gnu/Linux Distros
Programming
Databases
Links
Search
Regular
News
Interviews
Aaj Ka Tip
Aaj Ka Command
Community
Blogs
Wiki
Forums
Services
Free Software

Code reuse Print E-mail

Why write code that we already wrote for previous programs? Well here is a small tip that might save you
some time: Make a generic file with reusable functions.
Many languages make this easy to do. Object oriented languages like Java or C++ for example allow you to
make a class with utility functions, and then import them in your main program. This way you can use the
generic class in all your programs. Even in C you can do this by including the generic C file when compiling
with a command like:
gcc -o myprogram myprogram.c generic.c
Your generic utility functions would be in generic.c and gcc would simply add the file to myprogram.
< Previous   Next >



gnulinuxclub
Join Us
About Us
Contact Us
Support Us
Acknowlegdement
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!




Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org