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

C / C++ / MFC

 
AnswerRe: Multiple Definition error Pin
John R. Shaw14-Apr-07 18:02
John R. Shaw14-Apr-07 18:02 
GeneralRe: Multiple Definition error Pin
XTAL25615-Apr-07 1:54
XTAL25615-Apr-07 1:54 
Questionmost efficient way to code this Pin
arbster114-Apr-07 15:47
arbster114-Apr-07 15:47 
AnswerRe: most efficient way to code this Pin
John R. Shaw14-Apr-07 16:14
John R. Shaw14-Apr-07 16:14 
AnswerRe: most efficient way to code this Pin
bob1697214-Apr-07 16:44
bob1697214-Apr-07 16:44 
GeneralRe: most efficient way to code this Pin
arbster114-Apr-07 16:52
arbster114-Apr-07 16:52 
GeneralRe: most efficient way to code this Pin
bob1697214-Apr-07 17:29
bob1697214-Apr-07 17:29 
GeneralRe: most efficient way to code this Pin
arbster114-Apr-07 17:59
arbster114-Apr-07 17:59 
Hello, here is the function. The main function gets a line at a time from the file puts the line in the function and the function returns the array of tab positions via array reference. Hope this makes it easier. Thanks
<br />
int get_cols(int (&pos)[50], string line){<br />
<br />
	// put in a line and ill output the position of the tabs ie the coloums.<br />
<br />
	unsigned int i,loc=0,x=0;<br />
	for(i=0;;i++){<br />
		<br />
		loc=line.find('\t',x);<br />
		<br />
		if( loc != -1 )	{//make sure end of line hasnt been reached<br />
			//get positions of tabs and store in in array<br />
			pos[i+1]=loc+1;<br />
			x=loc+1;<br />
		}<br />
		<br />
		else{<br />
			pos[i+1]=line.size();//store pos the end of the line<br />
			break;<br />
		}<br />
	}<br />
	<br />
	<br />
	x=loc=0;<br />
//now wait for next line<br />
<br />
<br />
return 0;<br />
<br />
}<br />

GeneralRe: most efficient way to code this Pin
bob1697214-Apr-07 19:54
bob1697214-Apr-07 19:54 
GeneralRe: most efficient way to code this Pin
kakan15-Apr-07 19:27
professionalkakan15-Apr-07 19:27 
Questionlpvoid and structs Pin
ginjikun14-Apr-07 15:14
ginjikun14-Apr-07 15:14 
AnswerRe: lpvoid and structs Pin
John R. Shaw14-Apr-07 16:21
John R. Shaw14-Apr-07 16:21 
AnswerRe: lpvoid and structs Pin
John R. Shaw14-Apr-07 16:25
John R. Shaw14-Apr-07 16:25 
AnswerRe: lpvoid and structs Pin
d34studios14-Apr-07 16:46
d34studios14-Apr-07 16:46 
GeneralRe: lpvoid and structs Pin
ginjikun15-Apr-07 3:16
ginjikun15-Apr-07 3:16 
GeneralRe: lpvoid and structs Pin
Mark Salsbery15-Apr-07 13:56
Mark Salsbery15-Apr-07 13:56 
QuestionProblem of using selectSingleNode! [modified] Pin
Nothend14-Apr-07 15:11
Nothend14-Apr-07 15:11 
AnswerRe: Problem of using selectSingleNode! Pin
George L. Jackson14-Apr-07 15:27
George L. Jackson14-Apr-07 15:27 
GeneralRe: Problem of using selectSingleNode! Pin
Nothend14-Apr-07 15:40
Nothend14-Apr-07 15:40 
GeneralRe: Problem of using selectSingleNode! Pin
George L. Jackson14-Apr-07 15:58
George L. Jackson14-Apr-07 15:58 
GeneralRe: Problem of using selectSingleNode! Pin
Nothend14-Apr-07 16:13
Nothend14-Apr-07 16:13 
GeneralRe: Problem of using selectSingleNode! Pin
Nothend14-Apr-07 16:54
Nothend14-Apr-07 16:54 
GeneralRe: Problem of using selectSingleNode! [modified] Pin
George L. Jackson14-Apr-07 17:09
George L. Jackson14-Apr-07 17:09 
GeneralRe: Problem of using selectSingleNode! Pin
Nothend14-Apr-07 18:04
Nothend14-Apr-07 18:04 
GeneralRe: Problem of using selectSingleNode! Pin
George L. Jackson14-Apr-07 17:14
George L. Jackson14-Apr-07 17:14 

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.