I just want to initialize a List on Visual C++ but I am getting following errors:
- error: identifier “list” is undefined
- error C2065: ‘list’ : undeclared identifier
why is this happening?
my includes:
#include "stdlib.h"
#include "malloc.h"
#include "stdio.h"
#include <set>
#include <vector>
#include <string>
#include <list>
#include "stdafx.h"
#include <iostream>
#include <io.h>
#include <fcntl.h>
#include <fstream>
#include <WebServices.h>
#include "./WCF_managed_app.xsd.h"
#include "./WCF_managed_app_Client.wsdl.h"
#include "./WCF_managed_app_Client.xsd.h"
#include "./schemas.microsoft.com.2003.10.Serialization.xsd.h"
you probably have forgotten the
using namespace std;in your cpp file so as to have access to the definition oflistthat resides into thestdnamespace.personnaly I prefer not to use
using namespace std;and I use
std::listrather oflistin my cpp files