Which one is more basic: acetamide or aniline? Which one is more basic: acetamide or aniline?


I had approached the question by protonating both of the compounds. Then I judged them on the basis of the stability of the corresponding conjugate acid. 


In $\ce{CH3CONH3+}$, due to resonance, a positive charge is created on the oxygen atom. So, resonance is not very effective here. Hence $\ce{ CH3CONH2}$ is not a good base.     
In $\ce{C6H5NH3+}$, there is far better resonance which takes place.


From the above observations, I concluded that aniline is more basic. 

I had another view that $\ce{C6H5NH2}$ is a basic type of compound rather being salt-like as is $\ce{CH3CONH2}$.

Am I going in the right direction to solve the problem?
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}$.