User talk:Daviddoria: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(string inserter does exist)
(tag works)
Line 1: Line 1:
== highlight ==
[[User:BesuglovS|Looks like #tag works]] [[User:BesuglovS|BesuglovS]] 08:26, 4 November 2010 (EDT)
== Smart Pointers ==
== Smart Pointers ==



Revision as of 12:26, 4 November 2010

highlight

Looks like #tag works BesuglovS 08:26, 4 November 2010 (EDT)

Smart Pointers

This is Ken Porter, from the mailing list. Feel free to post questions on my Talk page (I've got email notification enabled) or directly by email. -- ScratchMonkey 01:24, 18 February 2010 (UTC)

I built the example, both with and without the const reference edit I suggested on my Talk page, and I'm not getting a leak popup when it exits. I'm building with the following commands:

<source lang="winbatch"> @rem build VTK cd g:\devel\vtk\output\vs9 cmake -D CMAKE_DEBUG_POSTFIX="_d" -D CMAKE_INSTALL_PREFIX=G:/devel/VTK/vs9 -D VTK_DEBUG_LEAKS=ON -G "Visual Studio 9 2008" ..\..\vtk-5.4.2 @rem build rectangular button example cd g:\devel\vtkButton\bin cmake -D CMAKE_DEBUG_POSTFIX="_d" -D VTK_DEBUG_LEAKS=ON -D VTK_DIR="g:/devel/VTK/vs9/lib/vtk-5.4" -G "Visual Studio 9 2008" ../src --debug-output </source>

I found I had to edit the resulting vcproj file to add the "_d" suffix to all the VTK library references in the Debug configuration.

-- ScratchMonkey 00:23, 19 February 2010 (UTC)

String Inserter

I use Visual Studio IDE for all my VTK and cout does not take std::string as a parameter to "<<" . Maybe other IDEs work I wasn't aware. Dpai 18:35, 3 March 2010 (UTC)

I just checked and in VC9 I find the inserter in the file vc/include/string. Search for "operator<<" and you'll find the one that inserts template basic_string into a basic_ostream. (These are the base classes for cout and std::string.) -- ScratchMonkey 19:36, 3 March 2010 (UTC)