i realize the topic isnt much descriptive but i thought that my code was a bit strange so i hope dw can give me a bit of info this is the most random thing ive ever made.
on windows it produces quite a bit of ruckus in the console but if i put the loop going forward no error ???? confused me too.
void backwards(string input){
int loop,o;
string i;
i=input;
string ot;
for(loop=sizeof(i)+1;loop!='\n';loop--){
cout<<i[loop];
}
// for(loop=0; loop!='\n';loop++){ this is the forward loop or i at least i believe its opposite is the above code.
// cout<<i[loop];
// }
}
im kinda curious as to why it does what it does.
memory leak ?