Tag Archives: The data structure

String operation to delete the character at the specified position

Using iterator and erase

Here, we use a function erase (iterator) of string to delete the characters at the specified position. The iterator iterator can string.begin () get the first iterator of the string, and then add different values to delete it.

	string s = "abcdefg";
	int i = 3;
	string::iterator itr = s.begin();
	itr+=i;
	s.erase(itr);
	s.erase(itr);
	cout<<s;

Here we want to delete “de”. Because we get the first iterator and add the value, we delete “d”. If we want to delete “e”, we don’t need to add any value, because the position of “e” is just “d”, so we just need to erase () again.

Experience of learning VTK

Now start to learn VTK, what can not yet.

simple view, learning VTK is far more promising than learning OpenGL.

main is feeling VTK is open source packages, which have written a lot of the underlying function, data structure and data organization and relative to our own writing function rich and robust.

>

On Windows, VTK installation is complicated. Because at present is not very familiar with, will not write temporarily. I haven’t learned how to set the right variables.

I’m sorry.

VTK, possibly the Visualization Toolkit If you want to learn it well, consult two books

VTK User’s Guide and VTK tool kit. It’s available on its official website.

Open source stuff is really good.