For lines 23 and 22 it says "you cannot assign to a variable that is constant."
anyone know how to fix this?
thanks in advanced, bookmark.
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
void print (const string & s);
string reverse(const string & s);
int main(){
print("blah");
reverse("blah");
system("pause");
}
void print (string & s){
int i;
int clrscr();
for(i=0;i<4;i++)
{
cout << s[i] << endl;
} } // function 1 end;
string reverse(const string & s) {
reverse(s.begin(), s.end());
cout << s << endl;
return 0;
} // function 2 end;