Click here to Skip to main content
15,867,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using 2 thread i receive a message " Access violation reading location 0x0000001c ". The cmd that generate the error is simply CString utilization... Pin
SNArruda1-Apr-09 14:31
SNArruda1-Apr-09 14:31 
GeneralRe: Using 2 thread i receive a message " Access violation reading location 0x0000001c ". The cmd that generate the error is simply CString utilization... Pin
Stuart Dootson1-Apr-09 21:44
professionalStuart Dootson1-Apr-09 21:44 
AnswerRe: Using 2 thread i receive a message " Access violation reading location 0x0000001c ". The cmd that generate the error is simply CString utilization... Pin
ThatsAlok1-Apr-09 18:19
ThatsAlok1-Apr-09 18:19 
GeneralRe: Using 2 thread i receive a message " Access violation reading location 0x0000001c ". The cmd that generate the error is simply CString utilization... Pin
SNArruda2-Apr-09 14:30
SNArruda2-Apr-09 14:30 
QuestionHow can I use GetModify/SetModify within CRichEditView Pin
Joseph Marzbani1-Apr-09 11:36
Joseph Marzbani1-Apr-09 11:36 
AnswerRe: How can I use GetModify/SetModify within CRichEditView Pin
Rick York1-Apr-09 11:49
mveRick York1-Apr-09 11:49 
AnswerRe: How can I use GetModify/SetModify within CRichEditView Pin
Stuart Dootson1-Apr-09 11:57
professionalStuart Dootson1-Apr-09 11:57 
QuestionExtracting a string from a tab-delimited file Pin
SomeGuy6541-Apr-09 11:19
SomeGuy6541-Apr-09 11:19 
I'm trying to create a small function for a program that should extract the data as a string from a column of a tab delimited text file. It seems to be returning an empty string though.

Let me know if you notice what's wrong with this function. Edit: this is VC++

Function:
string split_row(string line, int column)
{
	// The first column would be column 1 for this function. Pass in the string 
	// we want to parse and the column we want parsed. Will return just the string 
	// from the column indicated for this row.

	int c_temp;
	string data;
	int pos;
	const string delimiter = "\t";

	for(c_temp=1; c_temp<=9; c_temp++)
	{
		pos = line.find_first_of(delimiter);
		if (c_temp != column)
		{
			line.erase(0, pos);
		}
		else
		{
			data = line.substr(0, pos-1);
			break;
		}
	}
	return data;
}



If the string "row", below, were to be:
12	test Phone	2009


And we called split_row(row, 2) it should return "test Phone".

Thanks! (sorry for the stupid username)
AnswerRe: Extracting a string from a tab-delimited file Pin
Stuart Dootson1-Apr-09 12:05
professionalStuart Dootson1-Apr-09 12:05 
GeneralRe: Extracting a string from a tab-delimited file Pin
SomeGuy6541-Apr-09 14:13
SomeGuy6541-Apr-09 14:13 
QuestionXML Visual Studio 2003 MFC C++ Pin
ScotDolan1-Apr-09 10:59
ScotDolan1-Apr-09 10:59 
AnswerRe: XML Visual Studio 2003 MFC C++ Pin
CPallini1-Apr-09 11:09
mveCPallini1-Apr-09 11:09 
AnswerRe: XML Visual Studio 2003 MFC C++ Pin
Stuart Dootson1-Apr-09 11:55
professionalStuart Dootson1-Apr-09 11:55 
Questionsafe-cast serialization Pin
Member 26037721-Apr-09 7:57
Member 26037721-Apr-09 7:57 
AnswerRe: safe-cast serialization Pin
CPallini1-Apr-09 8:09
mveCPallini1-Apr-09 8:09 
GeneralRe: safe-cast serialization Pin
Member 26037721-Apr-09 9:45
Member 26037721-Apr-09 9:45 
GeneralRe: safe-cast serialization Pin
CPallini1-Apr-09 10:50
mveCPallini1-Apr-09 10:50 
AnswerRe: safe-cast serialization Pin
Joe Woodbury1-Apr-09 8:40
professionalJoe Woodbury1-Apr-09 8:40 
GeneralRe: safe-cast serialization Pin
grassrootkit1-Apr-09 8:48
grassrootkit1-Apr-09 8:48 
GeneralRe: safe-cast serialization Pin
Joe Woodbury1-Apr-09 8:50
professionalJoe Woodbury1-Apr-09 8:50 
GeneralRe: safe-cast serialization Pin
CPallini1-Apr-09 8:57
mveCPallini1-Apr-09 8:57 
GeneralRe: safe-cast serialization Pin
Member 26037721-Apr-09 9:46
Member 26037721-Apr-09 9:46 
AnswerRe: safe-cast serialization Pin
Stuart Dootson1-Apr-09 8:53
professionalStuart Dootson1-Apr-09 8:53 
GeneralRe: safe-cast serialization Pin
Member 26037721-Apr-09 9:43
Member 26037721-Apr-09 9:43 
GeneralRe: safe-cast serialization Pin
Stuart Dootson1-Apr-09 9:50
professionalStuart Dootson1-Apr-09 9:50 

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.