FrankyTheFish
Programmer
Hey guys quick question. I'm trying to read information from a file. This is the error I'm getting and below the code I'm using.
I'm trying to read any file name. The first file is for the song, the second file is for the sound effects. So the names have to be anything that the user wishes them to be.
Any ideas what I'm doing wrong?
Thanks for taking the time to look at this.
Frank
c:\Documents and Settings\FrancoisMessier\My Documents\Drive_F\Drive_F\SDL\sdlBitmaps.cpp(150): error C2440: '=' : cannot convert from 'std::basic_istream<_Elem,_Traits>::_Myt' to 'char [11]'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
char stringRead[255];
attackString = inFile.getline(stringRead, 255);
musicString = inFile.getline(stringRead, 255);
I'm trying to read any file name. The first file is for the song, the second file is for the sound effects. So the names have to be anything that the user wishes them to be.
Any ideas what I'm doing wrong?
Thanks for taking the time to look at this.
Frank
c:\Documents and Settings\FrancoisMessier\My Documents\Drive_F\Drive_F\SDL\sdlBitmaps.cpp(150): error C2440: '=' : cannot convert from 'std::basic_istream<_Elem,_Traits>::_Myt' to 'char [11]'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
char stringRead[255];
attackString = inFile.getline(stringRead, 255);
musicString = inFile.getline(stringRead, 255);