Click here to Skip to main content
15,886,012 members
Articles / Programming Languages / Markdown

Pointer to Pointer and Reference to Pointer

Rate me:
Please Sign up or sign in to vote.
4.65/5 (87 votes)
11 Jan 2018CPOL4 min read 959.7K   540   138  
Explains the reason behind using pointer-to-pointer and reference-to-pointer to modify a pointer passed to a function

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppPtr2PtrExample", "CppPtr2PtrExample\CppPtr2PtrExample.vcxproj", "{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Debug|x86 = Debug|x86
		Release|x64 = Release|x64
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Debug|x64.ActiveCfg = Debug|x64
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Debug|x64.Build.0 = Debug|x64
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Debug|x86.ActiveCfg = Debug|Win32
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Debug|x86.Build.0 = Debug|Win32
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Release|x64.ActiveCfg = Release|x64
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Release|x64.Build.0 = Release|x64
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Release|x86.ActiveCfg = Release|Win32
		{6DFF9826-D6B6-49CD-B45F-6964C32ADE75}.Release|x86.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Shao Voon is from Singapore. His interest lies primarily in computer graphics, software optimization, concurrency, security, and Agile methodologies.

In recent years, he shifted focus to software safety research. His hobby is writing a free C++ DirectX photo slideshow application which can be viewed here.

Comments and Discussions