/* * Copyright (c) 2002 by Cliff Green. All rights reserved. Individual files * may be covered by other copyrights (as noted in the file itself). * * Redistribution and use in source and binary forms are permitted * provided that this entire copyright notice is duplicated in all such * copies. * * This software is provided "as is" and without any expressed or implied * warranties, including, without limitation, the implied warranties of * merchantibility and fitness for any particular purpose. */ //---------------------------------------------------------------------- // Source file: palmain.cpp // Written by: Cliff Green, 2002 // Compiler: Metrowerks CodeWarrior Pro 6, g++ 3.0.4 // History: // Modified: Mar. 5, 2002 // By: Cliff Green // Comments: Main function for the PalCtr class. //---------------------------------------------------------------------- // This commentheader supports documentation tools such as Doc++ and // Doxygen: http://www.doxygen.org/ //---------------------------------------------------------------------- /// PalCtr main function and application. #include "pal.h" #include int main (int argc, char* argv[] ) { PalCtr pc; for (int i(1); i < argc; ++i) { std::cout << "'" << argv[i] << "' " << (pc.isPalindrome(argv[i]) ? "is" : "is not") << " a palindrome" << std::endl; } std::cout << "The total count of palindromes is " << pc.getCnt() << std::endl; std::cout << "\nThank you and have a good day." << std::endl; return 0; }