a mere licensee, and such owner owes him no duty except to refrain from inflicting wilful or wanton injury upon him. The doctrine applies equally to cases where the license is given by law. Gibson v. Leonard, 143 Ill. 182; Casey v. Adams, 234 Ill. 350. Counsel contend however that the case at bar is distinguishable from those cited, in that the ordinance alleged to have been violated, being general in its nature, was enacted for the benefit of all persons rightfully upon the premises, and imposed upon appellee the duty to use reasonable care to avoid injuring such persons, whether they were expressly or impliedly invited there by appellee or not. We regard such position as untenable. The ordinance could only have been intended to protect those who might go upon the private right of way of appellee upon its business or by its solicitation or invitation or by its authority; that is to say, those whose presence there might he reasonably anticipated. An ordinance which could properly he construed to impose upon a railroad company the duty to anticipate the presence of persons, even peace officers in the performance of their official duties, upon its private right of way necessarily at rare intervals and at unexpected times and places, and to exercise continuous vigilance to avoid' injuring them, would be manifestly unreasonable, and seriously interfere with the practical operation of railroads. Those operating them would thus be rendered unable to properly perform their duty to the public of furnishing cheap, safe and rapid transportation.
It is urged by counsel for appellant that inasmuch as it is averred in several counts of the declaration that appellee had knowledge, through certain of its servants, that appellant would go and be within its yards in the performance of his official duty, in the night time, on or about the day in question, it thus had specific notice of his presence there, and was bound to use reasonable care for his safety. The averment in question fails to state upon what particular