My code is this:
struct Book
{
char title[MAXBOOKS];
};
int fillarray(...)
{
Book theBook;
ifstream infile("library.txt");
while(true)
{
for(int i = 0; i < MAXBOOKS; i++)
{
infile.getline(theBook.title[i],MAXLENGTH);
cout << theBook.title[i];
for(int j = 0; j < MAXKEYWORDS; j++)
{
}
}
}
But when i debug it I come up with this error:
c:\documents and settings\owner\my documents\visual studio 2005\projects\hw 4\hw 4.cpp(29) : error C2664: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::getline(_El em *,std::streamsize)' : cannot convert parameter 1 from 'char' to 'char *'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\HW 4\Debug\BuildLog.htm"
HW 4 - 1 error(s), 0 warning(s)
CAN SOME ONE HELP ME!!!!!!??????