I am having an issue with one of my assignment of Cypher decrypting. I wanted to create a cypher class. This class will have a constructor which takes a 2 parameter key, and applies an affine shift of the form f(x) = ax + b, where the output character is the cyphertext of the plaintext character x.
javascript:PostPreview()
I am getting several errors.
and applies an affine shift of the form f(x) = ax + b
The Caesar cipher works like this:
alphabet = "abcdefghijklmnopqrstuvwxyz"
(user enters shift n == 2)
(user enters message msg == "hello")
(computing message enc from msg and n)
h -> j
e -> g
l -> n
l -> n
o -> q
(enc == "jgnnq")
Thank you guys for your suggestions. I used std::string but it still showing lots of errors. some of them are showing below:
1 2 3 4 5 6 7
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion)
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\ostream(679): could be 'std::basic_ostream<_Elem,_Traits> &std::operator <<<char,std::char_traits<char>>(std::basic_ostream<_Elem,_Traits> &,const char *)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]