Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ExtendWith
- winsock.h Broadcast
- c++ Broadcast
- 멀티바이트 문자 집합 사용
- 사전설치
- git 최초 설정
- Mqtt
- Plugins
- esp-wroom-32d
- 의존주입
- OpenCPN
- 정적 라이브러리에서 MFC 사용
- c++ set struct
- OpenXLSX 한글
- __vsnprintf
- Console
- wxWidget
- .gitattributes
- 설치 테스트
- __snprintf
- MFC
- SQLite3
- git 대용량 파일
- OpenCPN설치
- c2678
- LINK2001
- 확인할 수 없는 외부 기호
- Flutter
- sts4
- _sprintf
Archives
- Today
- Total
세상을 이롭게
c2678 이항'<':왼쪽 피연산자로 'const_Ty' 형식을 사용하는 연산자가 없거나 허용되는 변환이 없습니다. 본문
set 을 사용하려 하였고, 자체적으로 선언한 struct 를 사용하는 과정에서 Insert 시 나타난 문제이다.
결론은 내가 선언한 struct 의 인자를 비교하여 넣을지 말지에 대한 부분 때문에 operator 연산자를 재정의 해주는 것을 하지 않았기 때문이다.
operator를 재정의 해주어 컴파일러에게 헷갈리지 않게 알려주면 제대로 동작한다.
https://stackoverflow.com/questions/5816658/how-to-have-a-set-of-structs-in-c
How to have a set of structs in C++
I have a struct which has a unique key. I want to insert instances of these structs into a set. I know that to do this the < operator has to be overloaded so that set can make a comparison in or...
stackoverflow.com
'C,C++' 카테고리의 다른 글
errer LINK2001: 확인할 수 없는 외부 기호 (0) | 2022.07.20 |
---|---|
string Unicode to multibyte/UTF-8 변환하기 (0) | 2022.07.01 |
[C++] LNK2001, LNK1120 Class static 사용시 문제 (0) | 2022.02.10 |
VS MSB8008: 지정된 플랫폼 도구 집합(v142)이 설치되지 않았거나 올바르지 않습니다. (0) | 2021.11.29 |
VS Pointer Debugging (기초) (0) | 2021.11.29 |