1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
[code]
#include <iostream>
#include <vector>
using namespace std;
void IntakeManifold (){
vector<char> intake;
int i=0;
int InputSize=0;
cout << "Please enter message to encrypt." << endl << endl;
if(cin){
while (cin){
cin >> intake[i];
i++;
}
int InputSize = intake.size();
cout << InputSize; //this can go away later. Just here as a safety or something...
}
}
void InputArrayFiller (vector<char> intake, int InputSize){ //not actually an array, but...whatever...
vector<vector<int>>InVec;
for (int i=0; i < InputSize; i++)
{
if(intake[i]=='a'){
int SubArray[ ] = { 1, 1, 1 };
vector<int> vector; //really, naming an object as its data type? classy...
vector.assign( SubArray, SubArray + 3 ); //hope this works... LOOK THIS UP LATER
InVec[i]== vector;
}else if(intake[i]=='b'){
int SubArray[ ] = { 1, 1, 2 };
vector<int> vector;
vector.assign( SubArray, SubArray + 3 );
InVec[i]== vector;
}else if(intake[i]=='c'){
int SubArray[ ] = { 1, 1, 3 };
vector<int> vector;
vector.assign( SubArray, SubArray + 3 );
InVec[i]== vector;
//every letter in the alphabet's accounted for in my code, but it's done exactly the same as you see here, so I've omitted it.
}else if(intake[i]=='z'){
int SubArray[ ] = { 3, 3, 2 };
vector<int> vector;
vector.assign( SubArray, SubArray + 3 );
InVec[i]== vector;
}else if(intake[i]=='_'){
int SubArray[ ] = { 3, 3, 3 };
vector<int> vector;
vector.assign( SubArray, SubArray + 3 );
InVec[i]== vector;
}else{
}
}
}
void Rearrange(vector<vector<int>>InVec){
vector<int>ReTri;
int TriArrayLength = InVec.size();
for (int i=0; i < TriArrayLength; i++){
}
}
//use the "push_back" member function to merge. (This is just for me later)
int main(){
cout<< "use_underscores_instead_of_spaces"<<endl<<"do_not_use_punctuation"<<endl<< "do_not_use_capital_letters"<<endl;
IntakeManifold();
InputArrayFiller(vector<char> intake, int InputSize);
return 0;
}
|