![]() |
help :D
2. Write a C++ program that reads data from an input file called “Input.txt” and counts how many times the file contained words that are the same as their inverse. Such words are called e. The input file can be downloaded from the BB. The program should print the number of palindromes found in the text on the screen, and also saves a copy of each palindrome found in the input file in another file (output file) called “palindromes.txt”.
is this true ? ;D Code:
#include <iostream> |
Re: help :D
Please use code blocks when you post code. You've been around long enough now to know about them. It makes code easier to read by preserving the formatting and using a fixed pitch font.
Rather than me reading the code and trying to figure out if it's correct or not, why don't you plug it into your favourite compiler, write some test data and see what the program does with that data. If it picks out the right data and ignores the wrong, then it works. If it doesn't, then it doesn't. If you display the contents of temp just before returning from PalindromeChecker(), passing in some known words, does temp contain what you expect? |
Re: help :D
tried the code in Visual Studio 2008. Reduced the code to:
Code:
char *str="HellolleH"; |
| All times are GMT +5.5. The time now is 03:53. |