That question would be easier to answer if we knew the type of glue used. Generally, a heavy floor scraper will take off all the high spots and a dense padding is used if you want to carpet over it. If you are going with a hardwood floor, the new glue will smooth out some slight imperfections for a nice installation. If you are going with vinyl or a floating floor, then you will need to remove the residual glue chemically. There are a variety of adhesive removers available at your local carpet store that should do the trick but remember to keep the windows open with an exhaust fan and wear a filter mask and rubber gloves. The fumes from the remover can be irritating to the nose and throat at best and toxic at worst. Spray the remover on liberally and let it dissolve (soften) the glue and then scrape. If you can't find an adhesive remover, you might try muriatic acid using the safety suggestions above.