Which one is more basic: acetamide or aniline?
You can consider this in the following way. 

If amide undergoes protonation, it forms a positively charged nitrogen atom next to the strong electron-withdrawing group. This destabilises the molecule, so most probably it will not act as a base. Instead, it will act as a moderate acid with a strong base, since conjugate anion will be stabilized by the adjacent carbonyl group.

In the case of aniline, the phenyl group is not a strong withdrawing group. Still, the phenyl group withdraws electron density from the nitrogen atom through resonance. However, anilines can be protonated by strong acids. You can observe that during the formation of a diazonium salt, where aniline is protonated by strong acids like $\ce{HCl}$.