Actually i am not familiar with the WFS server,but looking in to the code the pointer variable *pszFilename is assigned to the URL of your server. In your URL you must also include the vector or the raster file that you want to open. And you must have that vector file or raster file in your URL directory.
for example for simple non server console application using visual studio if you have a shape file name city.shp then to open this file
first you have to copy and past the file city.shp and all its contents in to your visual stdio project directory.
the modifying the code as follow and compiling it will works.
const char *pszFilename = "city.shp";
poDataset = (GDALDataset *)GDALOpen(pszFilename, GA_ReadOnly);
cout<<"the file you want to open is not find"<<endl;