#include "SimpleRotationDecoder.cpp" int main(int argc, char **argv) { int i; class SimpleRotationDecoder TheClass; string retval; string cipherText; if (argc != 2) { fprintf(stderr, "usage: a.out num or -\n"); exit(1); } /* cipherText = ; */ if ((string) argv[1] == "-") { if (!(getline(cin, cipherText))) exit(1); } else { if (atoi(argv[1]) == 0) { cipherText = "mmbtvrbhhtgohaktklqegnrmlelojotyeyeiudvtil ey ffg"; } if (atoi(argv[1]) == 1) { cipherText = "ntgntgntgntofwlfwlfwlnookookook"; } if (atoi(argv[1]) == 2) { cipherText = "f sgnzslhzquq ydyuinmqiwfyrtdvn"; } if (atoi(argv[1]) == 3) { cipherText = "shxnaaeqjlofhhsuurbhpdgt z"; } } retval = TheClass.decode(cipherText); cout << retval << endl; exit(0); }