Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1
- 0
- First:Second
- Testing string!
- ---------------
- /**************
- * Author : karroje
- * Date : 2011-02-01
- * Purpose : Code provided for student to ensure that their
- * : Phase 01 code will correctly compile.
- * NOTE : This file does NOT comprehensivally test your code -- its only
- * : purpose to ensure that your code *compiles*. So long as you can
- * : compile your code with this file as main.cpp, the grader will
- * : be able to check for correctness. But it does not mean that your
- * : code is correct.
- **************/
- #include "rsa_functions.h"
- #include "encrypt.h"
- #include <iostream>
- using namespace std;
- int main() {
- char s1[] = "First";
- char s2[] = "Second";
- cout << isLetter('a') << endl;
- cout << isUpper('b') << endl;
- char* d = concatStrings(s1, s2, ':');
- cout << d << endl;
- char* t = "Testing string";
- char* s = (char*)malloc( (strlen(t) + 1)*sizeof(char));
- strncpy(s, t + '\0', strlen(t) +1);
- addChar(&s, '!');
- cout << s << endl;
- int size;
- char* s3 = readFile("main.cpp", &size);
- cout << "---------------\n" << s3 << "\n---------------\n";
- char* e = ceasarCipher(s3, size, 10);
- char* c = ceasarDecipher(e, size, 10);
- cout << "---------------\n" << c << "\n---------------\n";
- return 0;
- }
- ---------------
- ---------------
- /**************
- * Author : karroje
- * Date : 2011-02-01
- * Purpose : Code provided for student to ensure that their
- * : Phase 01 code will correctly compile.
- * NOTE : This file does NOT comprehensivally test your code -- its only
- * : purpose to ensure that your code *compiles*. So long as you can
- * : compile your code with this file as main.cpp, the grader will
- * : be able to check for correctness. But it does not mean that your
- * : code is correct.
- **************/
- #include "rsa_functions.h"
- #include "encrypt.h"
- #include <iostream>
- using namespace std;
- int main() {
- char s1[] = "First";
- char s2[] = "Second";
- cout << isLetter('a') << endl;
- cout << isUpper('b') << endl;
- char* d = concatStrings(s1, s2, ':');
- cout << d << endl;
- char* t = "Testing string";
- char* s = (char*)malloc( (strlen(t) + 1)*sizeof(char));
- strncpy(s, t + '\0', strlen(t) +1);
- addChar(&s, '!');
- cout << s << endl;
- int size;
- char* s3 = readFile("main.cpp", &size);
- cout << "---------------\n" << s3 << "\n---------------\n";
- char* e = ceasarCipher(s3, size, 10);
- char* c = ceasarDecipher(e, size, 10);
- cout << "---------------\n" << c << "\n---------------\n";
- return 0;
- }
- ---------------
- Press any key to continue . . .
Add Comment
Please, Sign In to add comment