I decided to make a program that would change the inserted text according to this pattern:Replacing every letter with the next one in the alphabet.For example:
"Cat"- "Dbu".
I started and it went well up untill a point,my code looks like this so far:
#include <iostream>
#include <string>
using namespace std;
void Funkcija1(string zbor)
{
char x;
zbor[x];
for(x=0;x<100;x++)
{
if(zbor[x]=='a')
zbor[x]='b';
}
cout<<zbor<<endl;
}
int main()
{
string Vs;
cin>>Vs;
Funkcija1(Vs);
system("PAUSE");
return EXIT_SUCCESS;
}
It seemed to work well,but when i tried to make the program to replace the letter "B" with "C",it replaced the allready replaced letter "B".I am a tottal begginer in C++ and with no experience in other programming languages so far.
I found help some time ago here on another question,i sincerely hope that you guys will be helpfull again.