title: Trying to create a basic "encrypter"
body: <p>It's a simple concept and not very secure, but just a practice session as i am a very early beginner (2 to 3 weeks)</p>
  <p>I basically wanted to interject a random amount of random characters, like numbers and expressions, in to the inputted message after each letter. So for example, &quot;HELLO&quot; would become &quot;<strong>H</strong>45[<strong>E</strong>[./43<strong>L</strong>/54<strong>L</strong>43[]<strong>O</strong>&quot;.</p>
  <p>However i just seem to be getting back the exact input, without the jargon being added in between. Any ideas?</p>
  <p>Here is my code:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ctime&gt;
  #include &lt;string&gt;
  
  
  std::string encryptFunc(std::string address){
  
      int i = 0;
      int store = address.length();
      
      std::string Output;
  
      
      while(i &lt; store){
  
          if(address[i] == ' ' || address[i] == 'a' || address[i] == 'b' || address[i] == 'c' || address[i] == 'd' || address[i] == 'e' || address[i] == 'f' || address[i] == 'g' || address[i] == 'h' || address[i] == 'i' || address[i] == 'j' || address[i] == 'k' || address[i] == 'l' || address[i] == 'm' || address[i] == 'n' || address[i] == 'o' || address[i] == 'p' || address[i] == 'q' || address[i] == 'r' || address[i] == 's' || address[i] == 't' || address[i] == 'u' || address[i] == 'v' || address[i] == 'w' || address[i] == 'x' || address[i] == 'y' || address[i] == 'z' || address[i] == 'A' || address[i] == 'B' || address[i] == 'C' || address[i] == 'D' || address[i] == 'E' || address[i] == 'F' || address[i] == 'G' || address[i] == 'H' || address[i] == 'I' || address[i] == 'J' || address[i] == 'K' || address[i] == 'L' || address[i] == 'M' || address[i] == 'N' || address[i] == 'O' || address[i] == 'P' || address[i] == 'Q' || address[i] == 'R' || address[i] == 'S' || address[i] == 'T' || address[i] == 'U' || address[i] == 'V' || address[i] == 'W' || address[i] == 'X' || address[i] == 'Y' || address[i] == 'Z'){
  
              
          srand(time(NULL));
  
          int randJargonSelect = rand()%26; //which character of individual jargon is currently selected to be placed
  
          char jargonSelection[] = {'1','2','3','?', '&lt;', '~', '@', '/', '#', '+', '*', '&amp;', '^', '%', '$', '!', '-', '0', '9', '8', '7', '6', '5', '4', '`', '|' };        
  
          char randPlacementJargon = jargonSelection[randJargonSelect]; //the variable holder for the character of jargon to place
          
          int randJargonAmount = rand()%500; //the amount of jargon chars to place
              
              Output = address[i], randPlacementJargon * randJargonAmount;
  
          }
          
              
              std::cout &lt;&lt; Output;
  
              i++;
  
          };
  
          std::string nada = &quot; &quot;;
          
          return nada;
  
  }
  
  
  int main(){
  
      std::string userin;
  
      std::cout &lt;&lt; &quot;Please enter the message you wish to encrypt&quot; &lt;&lt; std::endl;
      std::cout &lt;&lt; &quot;Enter here: &quot;; std::getline(std::cin, userin);
      std::cout &lt;&lt; &quot; &quot; &lt;&lt; std::endl;
      std::cout &lt;&lt; &quot;Here is your Encoded Message: &quot; &lt;&lt; encryptFunc(userin) &lt;&lt; std::endl;
      std::cout &lt;&lt; &quot; &quot; &lt;&lt; std::endl;
      system(&quot;pause&quot;);
  
      return 0;
  
  }
  </code></pre>
  <p>Thanks again. I know there are probably 100 better ways of doing this, but i just wish to understand it for the sake of learning.</p>