- 1
Some one help me not run this program plz plz
3 Answers
+ 2
iostream is just iostream in C++, not iostream.h.
+ 1
Hereâs a partial fix, got rid of errors at least:
(Also who downvotes @LunarCoffeesâs answer? That did help)
#include<iostream> //no .h
#include<cstdio> //stdio.h
#include<conio.h>
#include<cstring> //string.h
using namespace std; //for cout and endl
int main() //canât change type
{
//clrscr(); no idea what this should be doing
cout<<"\n enter string\n";
char s[100],temp;
gets(s);
int len=strlen(s);
int l=len-1; //you typed 1 instead of l
for(int i=0;i<len/2;i++)
{
temp=s[i];
s[i]=s[l];//forgot the =
s[l]=temp;
l--;
}
cout<<"\n reverse of the string=\n"<<s;
getch();
}
+ 1
Technically, there'd should be less errors in your code, but this app uses GNU GCC while you seem to be familiar with the Turbo C ++ Compiler.