943,982 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2634
  • C++ RSS
Nov 8th, 2006
0

i need help to encrypt characters

Expand Post »
Broken from here.

I Have quite the same probem . But I'm block at this point :


  1.  
  2. #include<iostream>
  3. using std::cout;
  4. using std::endl;
  5. unsignedint uiStringSize = 0;
  6. /* prototype fct encrypt */
  7. void encrypt( char * );
  8. /* prototype fct decrypt */
  9. void decrypt( char * );
  10. char i=0 ;
  11. int main()
  12. {
  13. // string to encrypt
  14. char string[] = "this is a secret";
  15. uiStringSize= sizeof( string ); int
  16.  
  17. cout << "original string of character : " << string << endl;
  18. encrypt( string );
  19. cout << "encrypt string is : " << string << endl;
  20. decrypt( string );
  21. cout << "decrypt string is : " << string << endl;
  22. return 0;
  23. }
  24.  
  25. void encrypt( char e[] )
  26. {
  27. /* Here I have to write the function that will encrypt each letter +1 */
  28. for ( i=0; i= uiStringSize; i++) // not sure, miss something
  29. }
  30. void decrypt( char *ePtr )
  31. {
  32. /* decrypt fct */
  33. for ( i=0; i= uiStringSize; i++) // ......
  34.  
  35. }
Last edited by WolfPack; Nov 9th, 2006 at 12:01 am. Reason: Added old thread link and changed the heading. Also added [CODE=C][/CODE] tags.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
toche is offline Offline
1 posts
since Nov 2006
Nov 9th, 2006
0

Re: i need help to encrypt characters

Is that really your code, because it won't even compile.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Stupid question(using class object)
Next Thread in C++ Forum Timeline: Can't find Syntax Error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC