I need a linked list expert !!!!!!!

Started by
32 comments, last by Jouei 16 years, 11 months ago
Tahnks for the artical again i have been reading it slowly to make sure i absorb everything, On another note if anyone is aware as to wether or not the Vc++ team fixed the stringstream memorie leak bug would you kindly let me know!

Ps sorry for the horible spelling lol
Advertisement
Wow, I totally forgot I'd already linked the debugging article. Oops. >_<
Ok so i got one last question and its about string stream -.^ yeah i know im needy

bool LoadSector(){	ifstream File("Room.sec",ios::in);	if(!File){return false;}		float x = 0.0f;	float y = 0.0f;	float z = 0.0f;	float Tx = 0.0f; 	float Ty = 0.0f;	istringstream iss;	int TexID = 0;	string Read;	Vertex V[3] = {Vertex(0.0f,0.0f,0.0f,0.0f,0.0f),Vertex(0.0f,0.0f,0.0f,0.0f,0.0f),Vertex(0.0f,0.0f,0.0f,0.0f,0.0f)};	File >>Read; //Get that first block character out from the start of the file		while(!File.eof())	{		std::getline(File, Read, '\n');			if(Read[1] != '/'  && Read[1] != '#' && Read[1] != '\0' && Read[1] != '\r')		{				}		if(Read[1] == '#')		{                iss.str(Read);                iss >>TexID;                cout <<TexID <<"\n";		}			}	File.close();return true;}


now the above code reads in a line witch has "# 1" in it and iss stream was supost to make TexID equal the number just after the # i tryed i removed the # by going Read[1] =' ';

and it still returns a zero is there an specif reason for this ? other then, the preset value ?

so i tested it with the iss.bad() and it seems theres something wrong with teh string i am passing into it.

First off when i Print the string to the screen it looks alright but theres an extra space at the front of it. could this peraphs have some kind of an affect ?

ps this sapce is not in the file being read!

[Edited by - Jouei on June 14, 2007 9:46:26 AM]
Omg ........ Ok well let me try and explain this. The file i was useing was crated on another computer and it seems that somehow other elements were introudced to the file.....

now why this happened is complty beyond me but it seems since i created a file from scratch on my own hardware that the code seems to be working now....
...
..
..
Im trying to pretend like im not angrey but really i am lol

This topic is closed to new replies.

Advertisement