'분류 전체보기'에 해당되는 글 58건
- 2013.01.04 엑셀 (MS Excel) 단축키
- 2012.12.29 MySQL의 NONCLUSTERED PRIMARY KEY 이슈
- 2012.12.28 Excel 함수
- 2012.12.28 자주 쓰는 Vim 명령어
- 2008.07.07 CFtpFileFind 재귀호출 / Calling CFtpFileFind recursively
- 2008.06.24 CListCtrl에 파일 drag and drop
- 2008.05.08 std::map <std::wstring, std::wstring>에러 1
- 2007.12.13 google chart test
카테고리 없음2013. 1. 4. 10:26
카테고리 없음2012. 12. 29. 07:13
MySQL 에서 GUID 처럼 순서가 의미 없는 값을 PRIMARY KEY 로 사용할 경우,
InnoDB 는 PRIMARY KEY 가 항상 CLUSTERED INDEX 이므로,
불필요한 DISK I/O 가 발생함.
따라서 MyISAM 등 다른 엔진 선택하는 것을 고려해야함.
꼭 InnoDB를 사용해야 한다면,
아래 PRIMARY KEY 생성 우선 순위를 참고해서,
기존의 PRIMARY KEY 필드는 NONCLUSTERED UNIQUE INDEX 로 변경하고,
작은 크기의 PRIMARY KEY 필드를 추가하는 방법도 있음.
* PRIMARY KEY 생성 우선순위
1) PRIMARY KEY 로 지정된 필드 : 당연!!
2) NOT NULL 이고, UNIQUE INDEX 인 첫번째 필드 : 자동으로 CLUSTERED INDEX 가 됨
3) 위 1) 2) 에 해당되지 않으면, 6 bytes 의 unsigned int 의 auto_increment 키를 row 생성 순서대로 만들어서, 내부적으로 PRIMARY KEY 로 사용함.
카테고리 없음2012. 12. 28. 16:26
카테고리 없음2012. 12. 28. 10:09
Command 실행
* dir Command 실행 예)
:! dir
* dir Command 실행 결과 읽기 예)
:r ! dir
컬럼 단위 블럭 지정
* VIM 에서 컬럼 단위 블럭 지정
Ctrl + V
* GVIM 에서 컬럼 단위 블럭 지정
Ctrl + Q
범위 지정
* 전체 (첫 줄에서 마지막 줄) 범위에서 문서 치환
:1,$s/aaa/bbb/g
문자 찾기 관련 명령어
* 현재 위치에서 정방향으로 '@' 문자 앞으로 커서 이동.
t@
* 현재 위치에서 '@' 문자 앞 까지 삭제.
dt@
* 현재 위치에서 '@' 문자 앞 까지 삭제하고 입력 모드로.
ct@
* 현재 위치에서 '@' 문자 앞 까지 복사.
yt@
* 현재 위치에서 '@' 문자 위치로 커서 이동.
f@
* 현재 위치에서 '@' 문자 까지 삭제.
df@
* 현재 위치에서 '@' 문자 까지 삭제하고 입력 모드로.
df@
* 현재 위치에서 '@' 문자 까지 복사.
yf@
* 현재 위치의 단어 찾기 (아래 방향)
Shift + *
* 현재 위치의 단어 찾기 (위 방향)
Shift + #
* 괄호 등의 쌍으로 된 기호 찾기 ( 다음 찾기, 같은 쌍의 시작, 종료 찾기 )
%
* 선택한 영역에서 단어 앞에 문자 , 추가
:'<,'>s/\</,/g
* 선택한 영역에서 단어 뒤에 문자 ; 추가
:'<,'>s/\>/;/g
* line 10 부터 20 을 line 30 으로 복사
:10,20co30
* line 10 부터 20 을 line 1 으로 이동
:10,20m1
* 검색 후 검색 결과를 line 단위로 line 40에 복사
:g/검색어/co40
* 검색 후 검색 결과를 line 단위로 line 40에 이동
:g/검색어/m40
* 검색 후 검색 결과를 line 단위로 보기
:g/검색어/p
대소문자 관련 명령어
* 커서 위치의 대소문자 토글( 대문자 -> 소문자, 소문자 -> 대문자) 후, 커서 이동.
~
* (블럭 지정 후) 지정한 블럭의 문자를 대문자로 변경
Shift + u ( 또는 U )
* (블럭 지정 후) 지정한 블럭의 문자를 소문자로 변경
u
화면 분할 관련 명령어
* 현재 파일을 수평 분할하여 표시
:split (또는 :sp)
* 현재 파일을 20의 넓이로 수평 분할하여 표시
:20 split (또는 :20sp)
* 수직 분할
:vsplit (또는 :vs)
* 현재 파일을 20의 넓이로 수직 분할하여 표시
:20 vsplit (는 :20vs)
* 현재 커서가 있는 창만 남기고 다른 창 닫기
:only (또는 :on)
* 현재 커서가 있는 창의 높이를 20으로 변경
:resize 20 (또는 :res 20 또는 z20)
* 현재 커서가 있는 창의 넓이를 20으로 변경
:vertical resize 20 (또는 :vertical res 20)
* 화면 분할 균등하게 하기
Ctrl + w + =
* 커서가 있는 창을 오른쪽으로 위치 변경
Ctrl + W + L
* 커서가 있는 창을 왼쪽으로 위치 변경
Ctrl + W + H
* 커서가 있는 창을 위쪽 위치 변경
Ctrl + W + J
* 커서가 있는 창을 아래쪽으로 위치 변경
Ctrl + W + K
정렬(Sort) 관련 명령어
* 문서 전체 정렬
:sort
* 문서 줄번호 10 ~20 정렬
:10,20sort
커서(Cursor) 관련 명령어
* 커서를 화면의 맨위로 이동
H ( 또는 Shift + h )
* 커서를 화면의 맨 아래로 이동
L ( 또는 Shift + l )
* test.txt 파일을 오픈하고, 커서를 마지막 라인으로 이동
C:\>vim + test.txt
* test.txt 파일을 오픈하고, 커서를 10 번째 라인으로 이동
C:\>vim +10 test.txt
* test.txt 파일을 오픈하고, keyword 를 발견한 첫번째 라인으로 커서 이동
C:\>vim +/keyword test.txt
* Cursor 위치에 가로줄 표시
:set cursorline
* Cursor 위치에 세로줄 표시
:set cursorcolumn
* Cursor 위치에 가로줄/세로줄 한번에 표시
:set cursorline cursorcolumn
북마크(Bookmark) 관련 명령어
* 북마크 추가
m + [a ~ z]
* 북마크로 이동
' + [a ~ z]
Tab 관련 명령어
:tabedit
* Tab 추가 ( 현재 위치에서 파일 선택 )
:tabedit ./
* Tab 이동
:tabn ( 앞으로 이동 )
:tabp ( 뒤로 이동 )
파일 형식 관련 명령어
* Unix 스타일로 텍스트 저장
:set ff=unix
:w
인코딩 관련 명령어
* 현재 인코딩 확인)
:set encoding
* 확장형 한글 완성형 지정 ( CP949 )
:set encoding=cp949
* UTF-8 지정 ( UTF-8 )
:set encoding=utf8
카테고리 없음2008. 7. 7. 01:06
CFtpFileFind 는 재귀 호출시 약간의 주의가 필요하다.
재귀 호출중, 이전으로 돌아갈 때,
다음 파일 또는 폴더에 대해서 CFtpFileFind::FindFile() 을 한번 더 호출해 주어야 한다.
하지만, CFtpFileFind::FindNextFile() 을 호출하는 파일 탐색 중에는 다음 파일 정보를 미리 알 수 없으므로,
다음과 같이 파일 수집과, 재귀 호출을 분리하여, 두번의 루프를 사용해야 한다.
// 이하, 약식 코드
CFilInfo : user defined file information class...
CInternetSession * m_pInternetSession = new CInternetSession;
CFtpConnection * m_pFTPConnection = (CFtpConnection*) m_pInternetSession->GetFtpConnection(szAddress);
CFtpFileFind * m_pFtpFind = new CFtpFileFind(m_pFTPConnection);
BOOL GetFTPFileListRecursive(CFilInfo *pFileInfo)
{
CString strPath;
strPath.Format(_T("%s/*"), pFileInfo->GetRemotePath());
m_pFTPConnection->SetCurrentDirectory(pFileInfo->GetRemotePath());
// gathering child file list first...
BOOL bContinue = m_pFtpFind->FindFile(strPath);
while (bContinue)
{
bContinue = m_pFtpFind->FindNextFile();
////////
if (m_pFtpFind->IsDots() == FALSE )
continue;
if(m_pFtpFind->IsDirectory() == TRUE)
{
// create file information.
CFileinfo * pFileChild = new CFileInfo;
pFileChild->SetIsDirectory(TRUE); // mark directory flag.
// do something...
// ... m_pFtpFind->GetFileName() ...
// save child file
pFileInfo->AddChild(pFileChild);
////////
// invalid usage !!!
// GetFTPFileListRecursive(pFileChild);
// m_pFTPConnection->SetCurrentDirectory(pFileInfo->GetRemotePath());
////////
}
else
{
// do something...
// ... pftpFind->GetFileName() ...
}
}
// recursive calling here
INT_PTR nSize = pFileInfo->GetChildCount();
for(INT_PTR iCnt = 0; iCnt < nSize; iCnt++)
{
CFileInfo * pFileInfoChild = pFileInfo->GetChild(iCnt);
if( pFileInfoChild == NULL )
continue;
if( pFileInfoChild->GetIsDirectory() == FALSE )
continue;
GetFTPFileListRecursive(pFileInfoChild);
}
return TRUE;
}
재귀 호출중, 이전으로 돌아갈 때,
다음 파일 또는 폴더에 대해서 CFtpFileFind::FindFile() 을 한번 더 호출해 주어야 한다.
하지만, CFtpFileFind::FindNextFile() 을 호출하는 파일 탐색 중에는 다음 파일 정보를 미리 알 수 없으므로,
다음과 같이 파일 수집과, 재귀 호출을 분리하여, 두번의 루프를 사용해야 한다.
// 이하, 약식 코드
CFilInfo : user defined file information class...
CInternetSession * m_pInternetSession = new CInternetSession;
CFtpConnection * m_pFTPConnection = (CFtpConnection*) m_pInternetSession->GetFtpConnection(szAddress);
CFtpFileFind * m_pFtpFind = new CFtpFileFind(m_pFTPConnection);
BOOL GetFTPFileListRecursive(CFilInfo *pFileInfo)
{
CString strPath;
strPath.Format(_T("%s/*"), pFileInfo->GetRemotePath());
m_pFTPConnection->SetCurrentDirectory(pFileInfo->GetRemotePath());
// gathering child file list first...
BOOL bContinue = m_pFtpFind->FindFile(strPath);
while (bContinue)
{
bContinue = m_pFtpFind->FindNextFile();
////////
if (m_pFtpFind->IsDots() == FALSE )
continue;
if(m_pFtpFind->IsDirectory() == TRUE)
{
// create file information.
CFileinfo * pFileChild = new CFileInfo;
pFileChild->SetIsDirectory(TRUE); // mark directory flag.
// do something...
// ... m_pFtpFind->GetFileName() ...
// save child file
pFileInfo->AddChild(pFileChild);
////////
// invalid usage !!!
// GetFTPFileListRecursive(pFileChild);
// m_pFTPConnection->SetCurrentDirectory(pFileInfo->GetRemotePath());
////////
}
else
{
// do something...
// ... pftpFind->GetFileName() ...
}
}
// recursive calling here
INT_PTR nSize = pFileInfo->GetChildCount();
for(INT_PTR iCnt = 0; iCnt < nSize; iCnt++)
{
CFileInfo * pFileInfoChild = pFileInfo->GetChild(iCnt);
if( pFileInfoChild == NULL )
continue;
if( pFileInfoChild->GetIsDirectory() == FALSE )
continue;
GetFTPFileListRecursive(pFileInfoChild);
}
return TRUE;
}
카테고리 없음2008. 6. 24. 00:14
// 파일탐색기에서 드래그앤드롭한 파일의 이름을 구해서 리스트컨트롤에 추가
////////////////////////////////////////////
// FileDropListCtrl.h
#pragma once
#include <afxole.h>
////////////////////////////////////////////
// CFileDropTarget
class CFileDropTarget : public COleDropTarget
{
public:
CFileDropTarget(CWnd* pWnd){m_pParent = pWnd;}
~CFileDropTarget(){}
private:
CWnd* m_pParent;
private:
BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
void OnDragLeave(CWnd* pWnd);
DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);
public:
void SetParent(CWnd* pWnd) { m_pParent = pWnd;}
BOOL FileNamesToList( HDROP hDrop, CPoint point );
};
////////////////////////////////////////////
// CFileDropListCtrl
class CFileDropListCtrl : public CListCtrl
{
DECLARE_DYNAMIC(CFileDropListCtrl)
public:
CFileDropListCtrl();
virtual ~CFileDropListCtrl();
protected:
DECLARE_MESSAGE_MAP()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
private:
CFileDropTarget m_dropTarget;
public:
void FileDropRegister();
};
///////////////////////////////////////////////////
// FileDropListCtrl.cpp
//
#include "stdafx.h"
#include "FileDropListCtrl.h"
////////////////////////////////////////////////////
// CFileDropTarget
DROPEFFECT CFileDropTarget::OnDragScroll(CWnd* /*pWnd*/, DWORD /*dwKeyState*/, CPoint /*point*/)
{
// return DROPEFFECT_SCROLL | DROPEFFECT_COPY | DROPEFFECT_LINK;
return DROPEFFECT_SCROLL | DROPEFFECT_COPY;
}
DROPEFFECT CFileDropTarget::OnDragEnter(CWnd* /*pWnd*/, COleDataObject* /*pDataObject*/,
DWORD /*dwKeyState*/, CPoint /*point*/)
{
return DROPEFFECT_COPY;
}
void CFileDropTarget::OnDragLeave(CWnd* /*pWnd*/)
{
}
DROPEFFECT CFileDropTarget::OnDragOver(CWnd* /*pWnd*/, COleDataObject* /*pDataObject*/,
DWORD /*dwKeyState*/, CPoint /*point*/)
{
return DROPEFFECT_COPY;
}
BOOL CFileDropTarget::OnDrop(CWnd* /*pWnd*/, COleDataObject* pDataObject,
DROPEFFECT /*dropEffect*/, CPoint point)
{
try
{
if( pDataObject->IsDataAvailable( CF_HDROP ) )
{
STGMEDIUM StgMed;
FORMATETC fmte = {CF_HDROP, (DVTARGETDEVICE FAR *)NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
if( pDataObject->GetData( CF_HDROP, &StgMed, &fmte ) )
{
if(! FileNamesToList( (HDROP)StgMed.hGlobal, point ) )
{
return FALSE;
} // if(! FileNamesToList( (HDROP)StgMed.hGlobal, point ) )
if (StgMed.pUnkForRelease)
{
StgMed.pUnkForRelease->Release();
}
else
{
::GlobalFree(StgMed.hGlobal);
} // if (StgMed.pUnkForRelease)...else
return TRUE;
} // if( pDataObject->GetData( CF_HDROP, &StgMed, &fmte ) )
} // if( pDataObject->IsDataAvailable( CF_HDROP ) )
} // try
catch(...)
{
return FALSE;
}
return TRUE;
}
BOOL CFileDropTarget::FileNamesToList( HDROP hDrop, CPoint point )
{
UINT cFiles = ::DragQueryFile(hDrop, (UINT)-1, NULL, 0);
if(cFiles <= 0)
{
return FALSE;
}
TCHAR szFile[MAX_PATH];
for( UINT count = 0; count < cFiles; count++ )
{
::DragQueryFile(hDrop, count, szFile, sizeof(szFile));
if( (m_pParent != NULL ) && ( ::IsWindow( m_pParent->GetSafeHwnd() ) != FALSE))
{
CListCtrl * pListCtrl = dynamic_cast<CListCtrl*>(m_pParent);
if( pListCtrl != NULL )
{
UINT uFlags;
int nItem = pListCtrl->HitTest(point, &uFlags);
CString strItem;
strItem.Format(_T("file=%s, nItem=%d, flag=0x%04x"),szFile, nItem, uFlags );
pListCtrl->InsertItem(0, strItem);
} // if( pListCtrl != NULL )
} // if( (m_pParent != NULL ) && ( ::IsWindow( m_pParent->GetSafeHwnd() ) != FALSE))
} // for( UINT count = 0; count < cFiles; count++ )
return TRUE;
}
////////////////////////////////////////////////////
// CFileDropListCtrl
IMPLEMENT_DYNAMIC(CFileDropListCtrl, CListCtrl)
CFileDropListCtrl::CFileDropListCtrl() : m_dropTarget(this)
{
}
CFileDropListCtrl::~CFileDropListCtrl()
{
}
BEGIN_MESSAGE_MAP(CFileDropListCtrl, CListCtrl)
ON_WM_CREATE()
END_MESSAGE_MAP()
// CFileDropListCtrl 메시지 처리기입니다.
int CFileDropListCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListCtrl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: 여기에 특수화된 작성 코드를 추가합니다.
FileDropRegister();
return 0;
}
void CFileDropListCtrl::FileDropRegister()
{
DragAcceptFiles();
m_dropTarget.Register(this);
}
////////////////////////////////////////////
// FileDropListCtrl.h
#pragma once
#include <afxole.h>
////////////////////////////////////////////
// CFileDropTarget
class CFileDropTarget : public COleDropTarget
{
public:
CFileDropTarget(CWnd* pWnd){m_pParent = pWnd;}
~CFileDropTarget(){}
private:
CWnd* m_pParent;
private:
BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
void OnDragLeave(CWnd* pWnd);
DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);
public:
void SetParent(CWnd* pWnd) { m_pParent = pWnd;}
BOOL FileNamesToList( HDROP hDrop, CPoint point );
};
////////////////////////////////////////////
// CFileDropListCtrl
class CFileDropListCtrl : public CListCtrl
{
DECLARE_DYNAMIC(CFileDropListCtrl)
public:
CFileDropListCtrl();
virtual ~CFileDropListCtrl();
protected:
DECLARE_MESSAGE_MAP()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
private:
CFileDropTarget m_dropTarget;
public:
void FileDropRegister();
};
///////////////////////////////////////////////////
// FileDropListCtrl.cpp
//
#include "stdafx.h"
#include "FileDropListCtrl.h"
////////////////////////////////////////////////////
// CFileDropTarget
DROPEFFECT CFileDropTarget::OnDragScroll(CWnd* /*pWnd*/, DWORD /*dwKeyState*/, CPoint /*point*/)
{
// return DROPEFFECT_SCROLL | DROPEFFECT_COPY | DROPEFFECT_LINK;
return DROPEFFECT_SCROLL | DROPEFFECT_COPY;
}
DROPEFFECT CFileDropTarget::OnDragEnter(CWnd* /*pWnd*/, COleDataObject* /*pDataObject*/,
DWORD /*dwKeyState*/, CPoint /*point*/)
{
return DROPEFFECT_COPY;
}
void CFileDropTarget::OnDragLeave(CWnd* /*pWnd*/)
{
}
DROPEFFECT CFileDropTarget::OnDragOver(CWnd* /*pWnd*/, COleDataObject* /*pDataObject*/,
DWORD /*dwKeyState*/, CPoint /*point*/)
{
return DROPEFFECT_COPY;
}
BOOL CFileDropTarget::OnDrop(CWnd* /*pWnd*/, COleDataObject* pDataObject,
DROPEFFECT /*dropEffect*/, CPoint point)
{
try
{
if( pDataObject->IsDataAvailable( CF_HDROP ) )
{
STGMEDIUM StgMed;
FORMATETC fmte = {CF_HDROP, (DVTARGETDEVICE FAR *)NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
if( pDataObject->GetData( CF_HDROP, &StgMed, &fmte ) )
{
if(! FileNamesToList( (HDROP)StgMed.hGlobal, point ) )
{
return FALSE;
} // if(! FileNamesToList( (HDROP)StgMed.hGlobal, point ) )
if (StgMed.pUnkForRelease)
{
StgMed.pUnkForRelease->Release();
}
else
{
::GlobalFree(StgMed.hGlobal);
} // if (StgMed.pUnkForRelease)...else
return TRUE;
} // if( pDataObject->GetData( CF_HDROP, &StgMed, &fmte ) )
} // if( pDataObject->IsDataAvailable( CF_HDROP ) )
} // try
catch(...)
{
return FALSE;
}
return TRUE;
}
BOOL CFileDropTarget::FileNamesToList( HDROP hDrop, CPoint point )
{
UINT cFiles = ::DragQueryFile(hDrop, (UINT)-1, NULL, 0);
if(cFiles <= 0)
{
return FALSE;
}
TCHAR szFile[MAX_PATH];
for( UINT count = 0; count < cFiles; count++ )
{
::DragQueryFile(hDrop, count, szFile, sizeof(szFile));
if( (m_pParent != NULL ) && ( ::IsWindow( m_pParent->GetSafeHwnd() ) != FALSE))
{
CListCtrl * pListCtrl = dynamic_cast<CListCtrl*>(m_pParent);
if( pListCtrl != NULL )
{
UINT uFlags;
int nItem = pListCtrl->HitTest(point, &uFlags);
CString strItem;
strItem.Format(_T("file=%s, nItem=%d, flag=0x%04x"),szFile, nItem, uFlags );
pListCtrl->InsertItem(0, strItem);
} // if( pListCtrl != NULL )
} // if( (m_pParent != NULL ) && ( ::IsWindow( m_pParent->GetSafeHwnd() ) != FALSE))
} // for( UINT count = 0; count < cFiles; count++ )
return TRUE;
}
////////////////////////////////////////////////////
// CFileDropListCtrl
IMPLEMENT_DYNAMIC(CFileDropListCtrl, CListCtrl)
CFileDropListCtrl::CFileDropListCtrl() : m_dropTarget(this)
{
}
CFileDropListCtrl::~CFileDropListCtrl()
{
}
BEGIN_MESSAGE_MAP(CFileDropListCtrl, CListCtrl)
ON_WM_CREATE()
END_MESSAGE_MAP()
// CFileDropListCtrl 메시지 처리기입니다.
int CFileDropListCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListCtrl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: 여기에 특수화된 작성 코드를 추가합니다.
FileDropRegister();
return 0;
}
void CFileDropListCtrl::FileDropRegister()
{
DragAcceptFiles();
m_dropTarget.Register(this);
}
카테고리 없음2008. 5. 8. 16:36
map 에서 wstring, string 을 키값으로 사용할 때 발생가능한 에러
작성일 : 2008-05-08
--------
std::map <std::wstring, std::wstring> m1;
typedef std::pair <std::wstring, std::wstring> wstring_pair; // <-- 에러 발생 시점
m1.insert ( wstring_pair ( L"key", L"value" ) );
또는
std::map <std::string, std::string> m1;
typedef std::pair <std::string, std::string> string_pair; // <-- 에러 발생 시점
m1.insert ( string_pair ( "key", "value" ) );
에서
오류 1 error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : 'const std::_Tree<_Traits> &'의 템플릿 인수를 'const std::wstring'에서 추론할 수 없습니다. c:\program files\microsoft visual studio 8\vc\include\functional 143
또는
오 류 1 error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : 'const std::_Tree<_Traits> &'의 템플릿 인수를 'const std::string'에서 추론할 수 없습니다. c:\program files\microsoft visual studio 8\vc\include\functional 143
이런 에러 발생시...
원인 및 해결책
#include <string> 이 선언되지 않았음. 소스코드에 추가할 것.
작성일 : 2008-05-08
--------
std::map <std::wstring, std::wstring> m1;
typedef std::pair <std::wstring, std::wstring> wstring_pair; // <-- 에러 발생 시점
m1.insert ( wstring_pair ( L"key", L"value" ) );
또는
std::map <std::string, std::string> m1;
typedef std::pair <std::string, std::string> string_pair; // <-- 에러 발생 시점
m1.insert ( string_pair ( "key", "value" ) );
에서
오류 1 error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : 'const std::_Tree<_Traits> &'의 템플릿 인수를 'const std::wstring'에서 추론할 수 없습니다. c:\program files\microsoft visual studio 8\vc\include\functional 143
또는
오 류 1 error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : 'const std::_Tree<_Traits> &'의 템플릿 인수를 'const std::string'에서 추론할 수 없습니다. c:\program files\microsoft visual studio 8\vc\include\functional 143
이런 에러 발생시...
원인 및 해결책
#include <string> 이 선언되지 않았음. 소스코드에 추가할 것.
카테고리 없음2007. 12. 13. 20:05