here is code[
#include<iostream>
#include<fstream>
#include<conio.h>
using namespace std;
struct book_dtail
{
int copies;
char title[50];
char author[50];
int year;
char **bn;
};
void main()
{
int size;
ifstream indata;
book_dtail user_book[5];
indata.open("file path to be added here");
for(int count=0;count<5;count++)
{
indata>>size;
user_book[count].copies=size;//2D array initialized.
user_book[count].bn=new char*[size];
for(int temp=0;temp<size;temp++)
{
user_book[count].bn[temp]=new char[4];
}
indata.getline(user_book[count].title,50);
indata.getline(user_book[count].author,50);
indata>>user_book[count].year;
for(int temp=0;temp<size;temp++)
{
indata.getline(user_book[count].bn[temp][4],50);//(error in this line)"error C2664: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::getline(_Elem *,std::streamsize)' : cannot convert parameter 1 from 'char' to 'char *'"
}
}
}
]
//i dont know cause of error , nd also how to remove it