Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Randy More's onscreenkeyboard project...question? Pin
gidtitan30-Aug-06 2:57
gidtitan30-Aug-06 2:57 
AnswerRe: Randy More's onscreenkeyboard project...question? Pin
Hamid_RT29-Aug-06 7:58
Hamid_RT29-Aug-06 7:58 
QuestionHow I can get listview subitem text of a listview on another process? Pin
Marco225028-Aug-06 9:04
Marco225028-Aug-06 9:04 
AnswerRe: How I can get listview subitem text of a listview on another process? Pin
Cristian Amarie28-Aug-06 10:01
Cristian Amarie28-Aug-06 10:01 
Questionerror... not compiling... Pin
jon-8028-Aug-06 8:28
professionaljon-8028-Aug-06 8:28 
AnswerRe: error... not compiling... Pin
Chris Losinger28-Aug-06 8:38
professionalChris Losinger28-Aug-06 8:38 
AnswerRe: error... not compiling... Pin
Jun Du28-Aug-06 8:39
Jun Du28-Aug-06 8:39 
AnswerRe: error... not compiling... Pin
Zac Howland28-Aug-06 9:35
Zac Howland28-Aug-06 9:35 
Just an FYI: Do not put using directives in header files. While it may seem harmless it can cause name conflicts when you start writing production code. Use fully qualified namespace names in your header files:

#pragma once
#include <vector>
#include <string>

// you won't need these when using vector and string
//#define MAX_LINES 100        
//#define MAX_FILENAME_LENGTH 100
//#define MAX_SENTENCE_LENGTH 1000
//#define MAX_WORD_LENGTH 25

//using std::string;	// BAD!!!!!

class CSentenceList
{
// Methods
public:
	CSentenceList(const std::string& strFileToRead, const bool bSorted = false);
	// alternatively, you can use the following
	CSentenceList(const std::vector<char>& strFileToRead, const bool bSorted = false);
	// you have no virtual functions, no need for overhead of vtable
	// by declaring a virtual destructor
	~CSentenceList();	
	void sort();

	// pass by const-ref
	unsigned int search(const string& strSearch);
	std::string display(unsigned int iLineNumber = 1);
        
// Properties
private:
	// these should be private, not public
	unsigned int _Size;
	std::vector<std::string> _Sentences;

	// I'm assuming this method will read the fill into memory?
	// that being the case:
	bool readFile(const std::string& strFileToRead);
};


If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: error... not compiling... Pin
Stephen Hewitt28-Aug-06 17:32
Stephen Hewitt28-Aug-06 17:32 
GeneralRe: error... not compiling... Pin
Zac Howland29-Aug-06 4:03
Zac Howland29-Aug-06 4:03 
QuestionPROCESS_INFORMATION [modified] Pin
Sam 200628-Aug-06 8:20
Sam 200628-Aug-06 8:20 
AnswerRe: PROCESS_INFORMATION Pin
valikac28-Aug-06 9:14
valikac28-Aug-06 9:14 
QuestionRe: PROCESS_INFORMATION Pin
David Crow28-Aug-06 10:37
David Crow28-Aug-06 10:37 
AnswerRe: PROCESS_INFORMATION Pin
Sam 200628-Aug-06 11:04
Sam 200628-Aug-06 11:04 
QuestionRe: PROCESS_INFORMATION Pin
David Crow29-Aug-06 2:40
David Crow29-Aug-06 2:40 
Questionedit control Pin
kumar_mk28-Aug-06 8:15
kumar_mk28-Aug-06 8:15 
AnswerRe: edit control Pin
led mike28-Aug-06 8:29
led mike28-Aug-06 8:29 
GeneralRe: edit control Pin
kumar_mk28-Aug-06 9:09
kumar_mk28-Aug-06 9:09 
GeneralRe: edit control Pin
led mike28-Aug-06 10:34
led mike28-Aug-06 10:34 
AnswerRe: edit control Pin
David Crow28-Aug-06 10:36
David Crow28-Aug-06 10:36 
QuestionDrawing on a CRichEditCtrl Pin
BlitzPackage28-Aug-06 6:03
BlitzPackage28-Aug-06 6:03 
QuestionRe: Drawing on a CRichEditCtrl Pin
David Crow28-Aug-06 6:10
David Crow28-Aug-06 6:10 
AnswerRe: Drawing on a CRichEditCtrl Pin
BlitzPackage28-Aug-06 7:35
BlitzPackage28-Aug-06 7:35 
GeneralRe: Drawing on a CRichEditCtrl Pin
David Crow28-Aug-06 8:08
David Crow28-Aug-06 8:08 
GeneralRe: Drawing on a CRichEditCtrl Pin
Waldermort28-Aug-06 12:17
Waldermort28-Aug-06 12:17 

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.