Bonjour ,

Je n'arrive pas à utiliser le type string en C++

Message d'erreur a la compilation
(sous visula sudio .NET 2003)
error c2065 , string undifined identifier
Ca ne marche pas meme quand je fais Pouvez vous m'aider ?

merci d'avance

mon code :
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
38
39
40
41
42
43
44
45
46
47
48
49
 
#include "stdafx.h"
#include "Global.asax.h"
#define WIN32_LEAN_AND_MEAN /
#include <windows.h>
#include "SophisWSClass.h"
 
namespace SophisWS
{
   double SophisWSClass::getSpot(int i)
   {
      std::string t = "toto";
      SetCurrentDirectory("D:\\Logiciel\\SophisValueV2.1.0.11\\");
      HMODULE hDLL = LoadLibrary("D:\\Logiciel\\SophisValueV2.1.0.11\\DLLPrototypeD.dll"); 
 
      //on declare un pointeur sur la fonction (avec des 2 parametre ici pour multiply)
      typedef double (WINAPI * DLL_Function_Spot)(int _Value);
      DLL_Function_Spot pfn_Spot;
      //on appelle GetProcAddress(hdll,NOM_DE_LA_FONCTION_DANS_FICHIER_.REF);
      pfn_Spot= (DLL_Function_Spot)GetProcAddress(hDLL,"GetSpot");
 
      //on appelle la fonction
      double res = pfn_Spot(i);
 
     //on libère la DLL
     FreeLibrary(hDLL);
 
     return res;
   }
 
   void SophisWSClass::loadApi()
   {
      SetCurrentDirectory("D:\\Logiciel\\SophisValueV2.1.0.11\\");
      HMODULE hDLL = LoadLibrary("D:\\Logiciel\\SophisValueV2.1.0.11\\DLLPrototypeD.dll"); 
 
      //on declare un pointeur sur la fonction (avec des 2 parametre ici pour multiply)
      typedef double (WINAPI * DLL_Function_Load)();
      DLL_Function_Load pfn_Load;
 
      //on appelle GetProcAddress(hdll,NOM_DE_LA_FONCTION_DANS_FICHIER_.REF);
      pfn_Load= (DLL_Function_Load)GetProcAddress(hDLL,"LoadAPI");
 
      //on appelle la fonction
      pfn_Load();
 
      //on libère la DLL
      FreeLibrary(hDLL);
    }
};