| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- Column
- Resident Evil
- c#
- 깃티gpg
- trayicon
- 젤리핀
- DataTable
- synology
- Header
- toroisegit
- Resident
- LogonUI
- gitea
- Capcom
- 깃티설치
- CmdKey
- theme
- jellyfin
- 시놀로지
- 깃티
- 트레이아이콘
- DataGridView
- gfd
- 시놀로지깃티설치
- Gitea 설치
- Gitea GPG
- gitea설치
- checkbox
- Re
- unable to boot the simulator
Archives
- Today
- Total
C O D I N G
std::String과 System::String간의 변환방법 본문
"일반적으로 String은 다 똑같다." 라고 알고있었는데
C++으로 코딩을 해보니 같은 String이지만
std::String과 닷넷String은 다르다
그래서 std::string으로 변수사용을 했다면 컨트롤에 있는 Text를
해당 변수에 넣어주기 위해서는 변환해주어야 한다.
std::string -> System::String 변환방법
#include <msclr\marshal_cppstd.h> // 헤더 추가하고
std::string 변수명 = mslr::interop::marshal_as<std::string>(System::String의 TEXT);
System::String -> std::string 변환방법
String^ temp = gcnew String(System::String변수명.c_str());
위와 같은 방법을 쓰면 변환이 가능하다.