It kinda getting really annoying when i had done all the research and in theory, this should be working, (but it did not)
Code:
#include <iostream.h>
#include <string>
int main()
{
using namespace std;
string s1, s2, s3;
char input1[20], input2[20];
cout<<"Input 1"<<endl;
cin>>input1;
cout<<"Input 2"<<endl;
cin>>input2;
s1 = input1;
s2 = input2;
s3 = s1 + "." + s2;
cout<<s3;
return 0;
}
For some reason, when i run it, the program gives me this message:
Code:
error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no acceptable conversi
on)
Can anyone please point out what i did wrong. Thanks a lot