指针令人困惑 [英] Pointers are confusing

查看:76
本文介绍了指针令人困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个专门针对C ++指针的PDF指南,它们是我在c ++中遇到的最令人困惑的事情(沿着时间和文件STL)



有没有人知道一个全面的指针指南,可以专门 从begginer的角度清除它



我尝试过:



Lynda cc ++ essentials,跳转到c ++,c ++入门

http:// www.learncpp.com/cpp-tutorial/69-dynamic-memory-allocation-with-new-and-delete/

i'm looking for an available guide as PDF specifically targeted at pointers in C++, they are by far the most confusing thing i came across in c++ (along side time and file STL)

does anyone know of a comprehensive guide to pointers that could specifically clear it up from begginer point of view

What I have tried:

Lynda cc++ essentials, jumping into c++, c++ primer
http://www.learncpp.com/cpp-tutorial/69-dynamic-memory-allocation-with-new-and-delete/

推荐答案

您可能找不到通过本网站提供的C ++ PDF指南:其中大部分都是电子书的非法复制品,我们不以任何方式,形式,形式或方式支持任何形式的版权侵犯。


您引用的任何书籍都将涵盖C ++中的指针 - 鉴于它们是该语言的基本部分 - 所以我建议您再次仔细阅读它们做练习。它们并不复杂:它们都是一个包含某些东西而不是对象本身的变量。如果你把一堆指针想象成一本书中的索引,每个索引条目指向书中的一个特定页面,那么你几乎已经理解了指针!
You probably won't find a PDF guide to C++ at all via this site: most of them are illegal copies of ebooks and we do not support any form of copyright violation in any way, shape, form , or means.

Any of the books you reference will cover pointers in C++ - given that they are a fundamental part of the language - so I'd suggest that you read them again carefully and do the exercises. They aren't complex: all they are is a variable that contains where something is rather than the object itself. If you think of a bunch of pointers as the index in a book with each index entry "pointing" to a specific page in the book then you have pretty much understood pointers!


这本书有已经被几代程序员用来在互联网时代之前学习C语言。你肯定会有用的东西



以下是该语言作者对C语言参考书的链接。

C编程语言 - 维基百科,免费的百科全书 [ ^ ]

https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf [ ^ ]

http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf [ ^ ]

--- -

不完全是你问的问题但是,调试器是一个令人难以置信的学习工具,它通过显示你的代码正在做什么来工作。



当你不理解你的代码在做什么或为什么它做它的作用时,答案是调试器

使用调试器来查看你的代码在做什么。只需设置断点并查看代码执行情况,调试器允许您逐行执行第1行并在执行时检查变量,这是一个令人难以置信的学习工具。



调试器 - 维基百科,免费的百科全书 [ ^ ]

掌握Visual Studio 2010中的调试 - 初学者指南 [ ^ ]

使用Visual Studio 2010进行基本调试 - YouTube [ ^ ]



调试器在这里向您展示您的代码在做什么你的任务是与它应该做的事情进行比较。

调试器中没有魔法,它没有发现错误,它只是帮助你。当代码没有达到预期效果时,你就接近了一个错误。
This book have been used by generations of programmers to learn C before the era of internet. You will certainly something useful

Here is links to references books on C by the authors of the language.
The C Programming Language - Wikipedia, the free encyclopedia[^]
https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^]
http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^]
-----
Not exactly what you asked but, The debugger is an incredible learning tool, it works by showing you what you code is doing.

When you don't understand what your code is doing or why it does what it does, the answer is debugger.
Use the debugger to see what your code is doing. Just set a breakpoint and see your code performing, the debugger allow you to execute lines 1 by 1 and to inspect variables as it execute, it is an incredible learning tool.

Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
Basic Debugging with Visual Studio 2010 - YouTube[^]

The debugger is here to show you what your code is doing and your task is to compare with what it should do.
There is no magic in the debugger, it don't find bugs, it just help you to. When the code don't do what is expected, you are close to a bug.


只需在Google中搜索C指针教程。
Just search for "C Pointers Tutorials" in Google.


这篇关于指针令人困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆