- 1
Some one help me not run this program plz plz
3 odpowiedzi
+ 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.