View Single Post
Old Mar 30th, 2008, 5:54 PM   #7
Marijan
Newbie
 
Join Date: Feb 2008
Posts: 15
Rep Power: 0 Marijan is on a distinguished road
Re: Got stuck while making a program,help would be appreciated

Quote:
Originally Posted by Freaky Chris View Post
let us know how it turns out
I managed to build this so far,the problem with typing other characters is solved,they remain the same as intended,but there is a problem with spaces and the letter z
code
c++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. #include <string>
  3. #include <ctype.h>
  4. using namespace std;
  5.  
  6. void Funkcija1(string zbor)
  7. { char a,b,c;
  8. char x;
  9. zbor[x];
  10. for(x=0;x<(zbor.length());x++)
  11. {
  12. if(isalpha(zbor[x]))
  13. zbor[x]=((int(zbor[x])+1));
  14.  
  15. }
  16.  
  17. cout<<zbor<<endl;
  18.  
  19. }
  20.  
  21. int main()
  22.  
  23. {
  24. string Vs;
  25. cin>>Vs;
  26. Funkcija1(Vs);
  27.  
  28. system("PAUSE");
  29.  
  30. return EXIT_SUCCESS;
  31.  
  32. }
Marijan is offline   Reply With Quote