| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| readme.txt | 2011-11-10 | 1.8 kB | |
| checks_10Nov11.7z | 2011-11-10 | 870.2 kB | |
| Totals: 2 Items | 872.0 kB | 0 |
readme.txt
Checks - a checksum and check digits C++ library
================================================
This library aims to help the C++ programmer to easily compute and check
checksum and check digits like ISBN and UPC/EAN that are widely used
on produce bar codes and credit cards.
The library is a collection of C++ header files
in Boost layout (there is no need to build a library).
You will need Boost libraries installed too
(but those that are used by Checks are all header-only too).
(The project was a Google Summer of Code in 2011 written by Pierre Talbot,
and may be submitted as a Boost library but is here to give a wider audience).
To use, you must download checks.zip,
and unzip to a location of your choice.
For example, you might unzip to folder or partition z:
so files are at z:/checks,
containing sub-folder /boost and /libs and their contents.
You must ensure that the #included files
are visible to your build system.
For Microsoft Visual Studio, this means adding the location
z:/visualization to your VC++ Directories, Include files list,
or by adding to Additional Include Directories.
To use, include an appropriate header file, here to check a Visa credit card number
#include <boost/checks/visa.hpp>
Create a std::string (for example) containing the number
std::string visa_credit_card_number = "4000 0807 0620 0007" ;
and you can check its validity
if( boost::checks::check_visa( visa_credit_card_number ) )
{
std::cout << "The VISA credit card number : " << visa_credit_card_number << " is valid." << std::endl ;
}
If all else fails, download and see the PDF or HTML manual for details.
Paul A. Bristow
Version 1, 10 Nov 11