Empowering CS learners, aspiring programmers, and startups with AI, Data Science & Programming insights — scaling skills from learning foundations to enterprise-grade solutions.
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[i] == argv[1][c])
{
s[i] == int argv[1][65 + c];
}
}
}
printf("ciphertext: %s", s);
[/dm_code_snippet]
Seeking help what is wrong with s[i] == int argv[1][65 + c];
Reply
assignment operation = is different than equality condition ==
Query
s[i] == int argv[1][65 + c];
Do you mean, it should be:
s[i] = int argv[1][65 + c];
instead of:
s[i] == int argv[1][65 + c];
Reply
aren’t you trying to “assign” the value of argv[][] to s[]?