- 1

Some one help me not run this program plz plz

https://code.sololearn.com/cABD1PgZdlv5/?ref=app

24th Jan 2018, 4:16 AM
Rashid Khan
Rashid Khan - avatar
3 odpowiedzi
+ 2
iostream is just iostream in C++, not iostream.h.
24th Jan 2018, 4:27 AM
LunarCoffee
LunarCoffee - avatar
+ 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(); }
24th Jan 2018, 4:43 AM
Jacob Pembleton
Jacob Pembleton - avatar
+ 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.
24th Jan 2018, 5:16 AM
Null
Null - avatar