Click here to Skip to main content
15,914,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Debugging Problem Pin
Nest22-Mar-11 3:12
Nest22-Mar-11 3:12 
QuestionUSB Power managment Pin
ameyakoshti27-Feb-09 23:02
ameyakoshti27-Feb-09 23:02 
Questionvector<string> problem??</string> Pin
york52827-Feb-09 22:58
york52827-Feb-09 22:58 
AnswerRe: vector problem?? Pin
Stuart Dootson27-Feb-09 23:30
professionalStuart Dootson27-Feb-09 23:30 
GeneralRe: vector problem?? Pin
bcoide28-Feb-09 0:14
bcoide28-Feb-09 0:14 
GeneralRe: vector problem?? Pin
york52828-Feb-09 3:11
york52828-Feb-09 3:11 
GeneralRe: vector problem?? Pin
york52828-Feb-09 2:59
york52828-Feb-09 2:59 
GeneralRe: vector problem?? Pin
Stuart Dootson28-Feb-09 3:13
professionalStuart Dootson28-Feb-09 3:13 
If you had

wchar_t fileBuffer[] = "youfriend你好朋友";


You could have:

typedef std::pair<wchar_t*,> Word;
std::vector<word> words;

words.push_back(std::make_pair(fileBuffer, fileBuffer+3); // Specifies "you"
words.push_back(std::make_pair(fileBuffer+3, fileBuffer+9); // Specifies "friend"
words.push_back(std::make_pair(fileBuffer+9, fileBuffer+11); // Specifies "你好"
words.push_back(std::make_pair(fileBuffer+11, fileBuffer+13); // Specifies "朋友"</word>
?

That could be less overhead than std::string, possibly.

Alternatively, you could use something like a trie[^] to hold all the words?

What's the intent, anyway - why are you building this list of words?

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: vector problem?? Pin
york52828-Feb-09 3:26
york52828-Feb-09 3:26 
AnswerRe: vector problem?? Pin
Rolf Kristensen1-Mar-09 0:49
Rolf Kristensen1-Mar-09 0:49 
GeneralRe: vector problem?? Pin
york5281-Mar-09 5:51
york5281-Mar-09 5:51 
QuestionThe sequence of menu command in doc/view architecture? Pin
Joseph Marzbani27-Feb-09 22:56
Joseph Marzbani27-Feb-09 22:56 
AnswerRe: The sequence of menu command in doc/view architecture? Pin
Stuart Dootson27-Feb-09 23:33
professionalStuart Dootson27-Feb-09 23:33 
QuestionHow to change the size and position of a CView Derived window in a SDI app? Pin
Joseph Marzbani27-Feb-09 22:13
Joseph Marzbani27-Feb-09 22:13 
AnswerRe: How to change the size and position of a CView Derived window in a SDI app? Pin
Stuart Dootson27-Feb-09 23:34
professionalStuart Dootson27-Feb-09 23:34 
GeneralRe: How to change the size and position of a CView Derived window in a SDI app? Pin
Joseph Marzbani28-Feb-09 2:30
Joseph Marzbani28-Feb-09 2:30 
GeneralRe: How to change the size and position of a CView Derived window in a SDI app? Pin
Stuart Dootson28-Feb-09 3:17
professionalStuart Dootson28-Feb-09 3:17 
QuestionConvert CString to wchar_t* - For very very large CString Pin
Md Saleem Navalur27-Feb-09 21:12
Md Saleem Navalur27-Feb-09 21:12 
AnswerRe: Convert CString to wchar_t* - For very very large CString Pin
«_Superman_»27-Feb-09 21:27
professional«_Superman_»27-Feb-09 21:27 
AnswerRe: Convert CString to wchar_t* - For very very large CString Pin
Stuart Dootson27-Feb-09 21:50
professionalStuart Dootson27-Feb-09 21:50 
GeneralRe: Convert CString to wchar_t* - For very very large CString Pin
Md Saleem Navalur27-Feb-09 23:10
Md Saleem Navalur27-Feb-09 23:10 
GeneralRe: Convert CString to wchar_t* - For very very large CString Pin
Stuart Dootson27-Feb-09 23:27
professionalStuart Dootson27-Feb-09 23:27 
AnswerRe: Convert CString to wchar_t* - For very very large CString Pin
Rolf Kristensen1-Mar-09 0:53
Rolf Kristensen1-Mar-09 0:53 
Questionerror LNK2019: unresolved external symbol "public: __thiscall Pin
PankajB27-Feb-09 20:20
PankajB27-Feb-09 20:20 
AnswerRe: error LNK2019: unresolved external symbol "public: __thiscall Pin
«_Superman_»27-Feb-09 20:24
professional«_Superman_»27-Feb-09 20:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.