Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: String Conversion Pin
satsumatable19-May-06 20:16
satsumatable19-May-06 20:16 
GeneralRe: String Conversion Pin
Nibu babu thomas19-May-06 20:20
Nibu babu thomas19-May-06 20:20 
GeneralRe: String Conversion Pin
NiceNaidu19-May-06 20:32
NiceNaidu19-May-06 20:32 
GeneralRe: String Conversion Pin
Nibu babu thomas19-May-06 20:36
Nibu babu thomas19-May-06 20:36 
GeneralRe: String Conversion [modifed] Pin
satsumatable19-May-06 20:42
satsumatable19-May-06 20:42 
QuestionMutiple document Templates Pin
RockyJames19-May-06 19:45
RockyJames19-May-06 19:45 
AnswerRe: Mutiple document Templates Pin
Nibu babu thomas19-May-06 19:57
Nibu babu thomas19-May-06 19:57 
GeneralRe: Mutiple document Templates Pin
RockyJames19-May-06 20:27
RockyJames19-May-06 20:27 
JokeRe: Mutiple document Templates Pin
Nibu babu thomas19-May-06 20:39
Nibu babu thomas19-May-06 20:39 
QuestionHow To Trap esc key code for Dailog Application Pin
CodeVarma19-May-06 19:24
CodeVarma19-May-06 19:24 
AnswerRe: How To Trap esc key code for Dailog Application [modifed] Pin
_AnsHUMAN_ 19-May-06 19:26
_AnsHUMAN_ 19-May-06 19:26 
AnswerRe: How To Trap esc key code for Dailog Application Pin
Laxman Auti19-May-06 20:05
Laxman Auti19-May-06 20:05 
AnswerRe: How To Trap esc key code for Dailog Application Pin
Rajesh R Subramanian19-May-06 21:17
professionalRajesh R Subramanian19-May-06 21:17 
Questionl don't know how to use iocp? please tell me how to do? Pin
YuxiLv19-May-06 16:44
YuxiLv19-May-06 16:44 
AnswerRe: l don't know how to use iocp? please tell me how to do? Pin
Nibu babu thomas19-May-06 19:37
Nibu babu thomas19-May-06 19:37 
Answerl am sorry! Pin
YuxiLv20-May-06 1:16
YuxiLv20-May-06 1:16 
QuestionHow to read parllel port Pin
mbkh_8419-May-06 15:56
mbkh_8419-May-06 15:56 
AnswerRe: How to read parllel port Pin
kk.tvm19-May-06 20:52
kk.tvm19-May-06 20:52 
GeneralRe: How to read parllel port Pin
Hamid_RT20-May-06 1:02
Hamid_RT20-May-06 1:02 
QuestionRounding up to a multiple of a number Pin
Remco Hoogenboezem19-May-06 11:03
Remco Hoogenboezem19-May-06 11:03 
AnswerRe: Rounding up to a multiple of a number Pin
Nibu babu thomas19-May-06 18:50
Nibu babu thomas19-May-06 18:50 
AnswerRe: Rounding up to a multiple of a number Pin
Laxman Auti19-May-06 19:11
Laxman Auti19-May-06 19:11 
QuestionProblem with Linked List Pin
CoffeeAddict1919-May-06 9:49
CoffeeAddict1919-May-06 9:49 
The end objective is to save a file to disk with data from a linked list. First this function converts the data already in the list into a buffer (string), which is sent along with the filename to another function (not listed here) so that the buffer is written to file. The problem is where I try to set the temporary variables which store the fields in the linked list so that they can be concatinated together into individual lines...to be later concatinated into the buffer (a c++ string). I'm getting this error 4 times from the compiler:

error C2110: '+' cannot add two pointers

The function with the problem:
<br />
void WeaveList::SaveToFile(string FileName)<br />
{<br />
	NodePtr currPtr = head; //Loop control pointer<br />
	bool WriteSucceeded = false;<br />
	string WeaveLine1,<br />
		   WeaveLine2,<br />
		   WeaveLine3,<br />
		   WeaveLine4,<br />
		   Buffer,<br />
		   tempWeaveName,<br />
		   tempExampleSizes;<br />
	double tempARMin,<br />
		   tempARMax = 0.0;<br />
	int tempNumRings = 0;<br />
<br />
	cout<<"Writing data to buffer..."<<endl;<br />
	if(!IsEmpty())<br />
	{<br />
		while(currPtr != NULL)<br />
		{<br />
			tempARMin = currPtr->AR_Range_Min;<br />
			tempARMax = currPtr->AR_Range_Max;<br />
			tempNumRings = currPtr->NumRingsUsed;<br />
			tempWeaveName = currPtr->WeaveName;<br />
			tempExampleSizes = currPtr->ExampleSizes;<br />
<br />
			WeaveLine1 = "Weave AR Range: " + "/t/t" + tempARMin + " - " + tempARMax;<br />
			WeaveLine2 = "Number of Rings Used:" + "/t/t" + tempNumRings;<br />
			WeaveLine3 = "Weave Name:" + "/t/t/t" + "!" + tempWeaveName;<br />
			WeaveLine4 = "Example Ring Sizes:" + "/t/t" + "!" + tempExampleSizes;<br />
			Buffer = Buffer + WeaveLine1 + "/n" + WeaveLine2 + "/n" + WeaveLine3 + "/n" + WeaveLine4;<br />
			if(currPtr->link != NULL)<br />
				Buffer = Buffer + "/n/n";<br />
			currPtr = currPtr->link; //advance to next node in list<br />
		}<br />
	}<br />
	else<br />
		Buffer = "";<br />
	WriteSucceeded = SaveListToFile(FileName, Buffer); //send the buffer to be saved<br />
	if(WriteSucceeded)<br />
		cout<<"SUCCESS!"<<endl;<br />
	else<br />
		cout<<"F***! Unable to write to file."<<endl;

I'm doing this totally on my own without an instructor to pester with questions, so any help would be appreciated. I can post the rest of the file if anyone wants, but it's kind of long.

-- modified at 15:53 Friday 19th May, 2006
AnswerRe: Problem with Linked List Pin
led mike19-May-06 11:22
led mike19-May-06 11:22 
AnswerRe: Problem with Linked List Pin
_AnsHUMAN_ 19-May-06 18:33
_AnsHUMAN_ 19-May-06 18:33 

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.