onurlexa
Decapat
- Katılım
- 4 Haziran 2021
- Mesajlar
- 70
- Çözümler
- 1
Daha fazla
- Cinsiyet
- Erkek
İyi günler arkadaşlar. C++ üzerinde yazmış olduğum kodda string hatası alıyorum yardımcı olan arkadaşlara şimdiden teşekkür ederim.
1 - using namespace std; kullandım.
2 - using std: String; kullandım. Fakat olmadı ikisinde de
Hata : ad alanı "std", "string" üyesine sahip değil.
1 - using namespace std; kullandım.
2 - using std: String; kullandım. Fakat olmadı ikisinde de
Hata : ad alanı "std", "string" üyesine sahip değil.
C++:
#include "global.h"
#include <iostream>
using namespace std;
DWORD GetGamePID() {
HWND hwGame = FindWindowA(0, "Counter-Strike: Global Offensive");
if (!hwGame) return 0;
DWORD ret = 0;
GetWindowThreadProcessId(hwGame, &ret);
return ret;
}
std::string Lpcwstr25tring(LPCWSTR lps) {
int len = WideCharToMultiByte(CP_ACP, 0, lps, -1, NULL, 0, NULL, NULL);
if (len <= 0) {
return "";
}
else {
char* dest = new char[len];
WideCharToMultiByte(CP_ACP, 0, lps, -1, dest, len, NULL, NULL);
dest[len - 1] = 0;
std::string str(dest);
delete[] dest;
return str;
}
}
Son düzenleme: