Bonjour , j'ai rencontré un probleme , sous mon VS2008 , je ne peux pas utiliser vector . Voici mon fichier d'entête :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
 
#pragma once
 
#include "targetver.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <windows.h>
#include <tchar.h>
#include <WsdApi.h>
#include <WsdDisco.h>
#include <vector>
//
 
//#include <WsdXmldom.h>
using namespace std;
//#include <std::vector>
//#include <std::string>
 
 
// TODO: reference additional headers your program requires here
mon code source
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "stdafx.h"

#include "PrinterServiceTypeTypes.h"
using namespace std;

typedef struct _mydata{
	IWSDiscoveryProvider * pProvider;
	WSD_NAME_LIST types;
	LPCWSTR pszTag;
}MYDATA,*PMYDATA;

class myDiscoveryProviderNotify : public IWSDiscoveryProviderNotify{

	private:
		LONG m_cRef;
		//IWSDiscoveredService *pService;

	public:
		TCHAR sElementList[260];
		vector <int> xadrs;		myDiscoveryProviderNotify(){};
        HRESULT STDMETHODCALLTYPE Add(IWSDiscoveredService *pService)
		{	
			//MessageBox(NULL,(LPCWSTR)L"OK",L"I'm ADD",MB_OK);
			HRESULT hr = S_OK;
			HRESULT hr_device = S_OK;
			HRESULT hr_model = S_OK;
			HRESULT hr_pnpx = S_OK;
			WSD_ENDPOINT_REFERENCE* pEndpoint = NULL;
			WSD_THIS_DEVICE_METADATA* pMetadata_device = NULL;
			WSD_THIS_MODEL_METADATA* pMetadata_model = NULL;
			IWSDEndpointProxy * endpointproxy = NULL;
			IWSDDeviceProxy* pDevice = NULL;
			hr = pService->GetEndpointReference( &pEndpoint );
			WSD_URI_LIST * uri_list = NULL;
			WSDXML_ELEMENT * any_model = NULL;
			DWORD dwError = NULL;
apres la compilation , il me retourne
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
e:\projects\test_disco\test_disco\test_disco.cpp(23) : error C2143: syntax error : missing ';' before '<'
e:\projects\test_disco\test_disco\test_disco.cpp(23) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\projects\test_disco\test_disco\test_disco.cpp(23) : error C2238: unexpected token(s) preceding ';'
Quelqu'un sait qu'est-ce que je dois faire ?