Below is the code given i have made this program to concatenate two strings concatenation but after concatenation in display it doesnot displays the first word.....i think there is some thing missing in cin.ignore() kindly check and help me????
#include "stdafx.h"
#include<iostream>
#include <stdio.h>
#include <string>
#define MAX 100
using namespace std;
void main ()
{
char str[MAX],abc[MAX];
cout<<"\nEnter the string 1"; //Errors in this program are that after concatenation first letter is not displayed
cin.ignore(); //error is that i want to store result in another char say char d[MAX] but it gives error
cin.get(str,MAX);
cout<<"\nEnter The String 2";
cin.ignore();
cin.get(abc,MAX);
cout<<"\nS1="<<str;
cout<<"\ns2="<<abc;
strcat(str,abc);
cout<<"\nStrings after catenation are"<<str;
system("pause");