equali() problem
Hello. I've got the following code below; which in summary, reads a file and sees if the current map is listed in the file. For an unknown reason, the comparation of the two strings (mapname and data) isn't working and makes function output false
Code:
new mapname[33]; |
Re: equali() problem
Try to insert 'trim( data )' just after 'fget()'.
|
Re: equali() problem
That appears to have done the trick. Thanks again :)
|
Re: equali() problem
Because some spaces are presents, probably.
|
Re: equali() problem
not spaces
line feed ;) fgets doesn't remove '\n' at the end of the string |
Re: equali() problem
Quote:
|
All times are GMT -4. The time now is 09:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.