• Skip to main content
  • Skip to footer

SoftwareProg.com

Software programming learning aide

  • Blog
    • Discussion
  • News
  • CS50’s Introduction to Computer Science by Harvard University on Edx
    • Week 1
    • Week 2
    • Week 3
    • Week 4
    • Week 5

Assigning keys to plaintext with ASCII

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2 › Assigning keys to plaintext with ASCII

Tagged: pseudocode of substitution project, substitution project

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 20, 2022 at 7:04 am #233
    admin
    Keymaster


      Copy Code
      Copied
      Use a different Browser

      
      
       for (int i = 0; i < countstring; i++) //starts with first character of plaintext till the end
      {
          for (int c = 0; c < 25; c++)
          {
              if (s == argv[1][c])
              {
              s == int argv[1][65 + c];
              }
           }
      }
      printf("ciphertext: %s", s);

      Seeking help what is wrong with s == int argv[1][65 + c];


      Reply


      assignment operation = is different than equality condition ==


      Query


      s == int argv[1][65 + c];

      Do you mean, it should be:

      s = int argv[1][65 + c];

      instead of:

      s == int argv[1][65 + c];


      Reply


      aren’t you trying to “assign” the value of argv[][] to s[]?


      Query


      Yes.


      Reply


      then use assignment operator[learn_press_profile]

    • Author
      Posts
    Log In Register Lost Password
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Log in / Register

    Initiative by Digital Splendid OPC Pvt. Ltd.