in 3.0, SIFT and SURF were moved to the opencv_contrib repo
you will need to clone/fork/download that, and add that to your cmake;
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules
then, after building,
#include "opencv2/xfeatures2d/nonfree.hpp"
if you want to use SIFT/SURF directly, it's
[EDIT: latest refactoring removed a lot of possibilities. you can't create a'stack' object anymore, also, the 'factory functions'(Algorithm) are gone. ]
xfeatures2d::SURF surf;
Ptr<xfeatures2d::SURF> surf = xfeatures2d::SURF::create();
if you want the factory functions:
xfeatures2d::initModule_xfeatures2d(); // note additional namespace
Ptr<FeatureDetector> sift = FeatureDetector::create("SIFT");
last, you will have to link against opencv_xfeatures2d.