[ create a new paste ] login | about

Link: http://codepad.org/WTDfHJhW    [ raw code | fork ]

C++, pasted on Dec 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	Face Face::lire (char * ligne, const Table <Vertex> &table_vertex )
	{
		char separateur [] = {" \t\n"} ;
		char * split ;

		// Obtention du nom de la face
		split = strtok (ligne, separateur) ;
		if ( split == NULL ) return Face("") ;
		Face f(split) ;

		// Attribution des sommets
		for (split = strtok(NULL, separateur) ; split != NULL ; split = strtok(NULL, separateur) )
		{
			for ( int i = 0 ; i < table_vertex.nombre() ; i++ )
			{
				if ( strcmp ( split, table_vertex.element(i).nom() ) == 0 ) f.addvertex( table_vertex.element(i)  ) ;
			}
		}

		return f ;
	}


Create a new paste based on this one


Comments: