gets() has been removed since C++14.
You can't use it in modern C++.
It is C function.
In C++ there is getline() function;
Your code is mix of C and C++
If you want to use C++, you can rewite your code as follow:
using namespace std;
cout<<"enter the first string";
cout<<"enter the second string";
cout<<"strings obtained on concatenation "<<a<<"\n";
I have also searched for this but I didn't get it , even professional haven't given answer for this . I don't know why but I will suggest you to don't use this declaration (gets())as this is very sensitive and hard to be mastered also no one cares this function with this c language .Thanks for asking your doubt🤗
What kind of errors?
May be you are using wrong (or old) compiler?
In your code was #include<conio.h>
It was used on DOS compilers.
gets was defined in stdio c-header file
you can try to include this header file if you are using old DOS compiler.
try this (you should enter 2 strings when you run program):
Did you try to append
at the top of the file?
also semicolon in line #15 should be at the end of the line (not inside string).
I appended #include <stdio.h> in your file and fixed line#15
This code will not compile in CodePlayground!!!!!
Try to compile it with your turbo C++