C++5年以上资深工程师面试题目以及详细解答。 1 简述C、C++程序编译的内存分配情况 2 谈谈你对拷贝构造函数和赋值运算符的认识 3 用C++设计一个不能被继承的类 4 简述队列和栈的异同 5 深拷贝和浅拷贝的区别是什么 6 栈上分配内存和堆上分配内存有什么区别? 7 C++ 的一个类中,静态成员函数和普通成员函数有什么区别? 8 简述指针常量与常量指针区别 9 如何避免“野指针” 10 C++ 仿函数是干什么用的? 11 什么时候使用虚析构函数? 为什么? 12 为什么将 0.1f 更改为 0 性能会降低 10 倍? 13 什么时候使用对象指针,什么时候使用对象本身? 14 在C++中,构造函数是否可以是虚函数?为什么? 15 指针和引用的区别是什么? 16 请描述C++程序的内存分区? 17 什么时候必须使用初始化列表?使用初始化列表有什么好处? 18 编译时多态和运行时多态的区别? 19 智能指针是线程安全的吗?哪些地方需要考虑线程安全? 20 虚函数表是在什么时候确定的?那虚表指针呢?
2023-08-31 08:48:26 29KB c++ 求职面试
1
某某学院课程-C++ 基础与深度解析
2023-08-30 20:47:43 84B C++
1
内容涉及到线程池,数据库连接池,状态机转换,是比较完整的网页服务器,可以在浏览器注册、登录以及浏览视频等
2023-08-30 15:16:51 55.6MB c++ 线程池 数据库连接池 状态机
1
Pointers On C brings the power of pointers to your C programs. Designed for professionals and advanced students, Pointers on C provides a comprehensive resource for those needing in-depth coverage of the C programming language. An extensive explanation of pointer basics and a thorough exploration of their advanced features allows programmers to incorporate the power of pointers into their C programs. Complete coverage, detailed explanations of C programming idioms, and thorough discussion of advanced topics makes Pointers on C a valuable tutorial and reference for students and professionals alike. Features and Benefits Provides complete background information needed for a thorough understanding of C. Covers pointers thoroughly, including syntax, techniques for their effective use and common programming idioms in which they appear. Compares different methods for implementing common abstract data structures. Offers an easy, conversant writing style to clearly explain difficult topics, and contains numerous illustrations and diagrams to help visualize complex concepts. Includes Programming Tips, discussing efficiency, portability, and software engineering issues, and warns of common pitfalls using Caution! Sections. Describes every function on the standard C library. For those who need an up-to-date ANSI overview of the C programming language, this book would be an excellent introduction. Pointers are usually a stumbling block for those programming C initially, but the author does an excellent job of detailing the use of pointers in this book. The use of pointers dominates the entire book, and after studying it, readers will have a thorough, practical knowledge of how to take advantage of the performance power of C language, due mostly to its use of pointers. For those programming in a commercial/business environment, where coding practices are strictly enforced, this book would be a good desk reference, as the author includes discussion of sound programming practices throughout the book. The book would also serve well those involved in teaching C in the classroom, as it contains many exercises, ranging from very easy to highly advanced. And for those readers frequently facing legacy code in C, such as scientific programmers, the author cites the differences between the older "Kernighan-Ritchie" C, and the more modern ANSI C, the latter being used in the book. These differences are indicated in the margin of the book, and are of an enormous help for those who must take older code and get it to run on more up-to-date compilers. The author also endeavors to organize the C code for those who are going on to study C++ and the accompanying object-oriented approach to programming. In addition, he emphasizes how to write C code so as to make it more portable. For those writing commercial applications in C that must be used on different platforms, this is a very important issue of course. Particularly well-written is the author's discussion on the storage class of a variable, noting, for those such as I who are pre-disposed to using recursion, that the formal parameters to a function cannot be static if recursion is to be supported. The book is full of examples such as this that give readers insight on the workings of C that fit their particular programming style. He does discuss `goto' statements in relation to function scope and in C statement structures, but, thankfully, recommends such statements never be used. He gives an interesting counterexample to those who say that goto statements must be used to break out of nested loops. Also, the author discusses the difference between L- and R-values, and this is not usually included in beginning books on C. Dynamic memory allocation has been at times a somewhat painful aspect of programming in C, but the author shows how to do straightforwardly in the book. Having a book like this that is predominantly about pointers is quite a blessing for those who are inexperienced with them or for more experienced programmers who are still uncomfortable with their use. It is not uncommon these days to have to write programs in one's professional work that involve triple pointers or even quadruple pointers. In addition, for embedded systems programming, the use of pointer arithmetic is almost mandatory. This also is true for writing applications in cryptography using C. The author does pay careful attention to pointer arithmetic in the book. The performance pay-off for using pointers is undeniable, and so a thorough knowledge of their use and pit-falls is of upmost importance for those C programmers who are involved in writing performance-sensitive applications. The author discusses in detail what can happen when pointers are misused and gives many examples of what to avoid and good hints for the proper use of pointers. He recommends against the use of the `null' pointer in array searching, and recommends a strategy for circumventing them. Some very helpful diagrams are given for explaining pointer expressions. In addition, the author gives helpful hints on when to use pointers and not subscripts when manipulating arrays in C. The performance issues involved in this are extremely important in scientific programming using C. The author gives a very interesting example of the differences in performance using pointers involving a program to copy the contents of one array into another. Arrays of pointers, useful in data mining applications, are also given ample treatment in this book, and the author addresses the issue of when to use a matrix instead of an array of pointers. The author also gives an effective presentation of functions in C, particularly the construction of recursive functions, and he employs some useful diagrams to illustrate how the variables in a recursive function call change on the stack. The performance hit experienced by using recursion versus iterative loops is discussed in a standard way via the Fibonacci series. Those readers raised in the functional programming paradigm will want to pay notice these performance issues when using C to do recursion. Along the same lines, the author shows how to implement functions with variable argument lists in C. This is another topic that is frequently passed over in beginning books on C. The author's treatment of data structures in C is also very nicely done, and he includes again a topic not usually treated in beginning books on C, namely the concept of a self-referential data structure. These are very important in applications in artificial intelligence, and the author shows how to implement them in C using a data structure that points to itself. This leads to a discussion of incomplete declarations. Very helpful diagrams are used again to discuss how to access members of data structures and how to point to data structures. Bit fields, so often used in embedded system applications, are also given a detailed treatment.
2023-08-29 22:08:19 3.79MB Pointers C C++ Memory
1
Matlab与C++混合程序设计教程,书中有详细代码可供参考
2023-08-29 10:47:52 26.81MB MATLAB C++ 混合程序设计
1
C++客户端连接TWinCat3 ADS. 结合opencv
2023-08-29 09:54:23 210KB TWincat3 ADS C++
1
Craft.io 什么? Raft Consensus 协议的 C 实现,BSD 许可 它是如何工作的? 有关完整文档,请参阅 raft.h。 网络超出了该项目的范围。 实现者需要做所有的管道。 目前,这是通过以下方式完成的: 实现 raft_cbs_t 中的所有回调; 和 使用 .* 消息结构调用 .* 函数 依赖项 ------------ 没有依赖项,但是是测试所需。 建造 $make 去做 成员变动 日志压缩 更多场景测试(即更多样化的网络分区场景) 使用示例
2023-08-28 22:04:00 36KB C++
1
C++/CLI is Microsoft's latest extension to C++ that targets the heart of .NET 2.0, the common language runtime. Expert Visual C++/CLI is written by visual C++ MVP Marcus Heege, who examines the core of the C++/CLI language. He explains both how the language elements work and how Microsoft intends them to be used. Even if you're new to C++/CLI but are planning to migrate to it from another language, this book will ground you in the core language elements and give you the confidence to explore further and migrate effectively. It provides concise, yet in-depth coverage of all major C++/CLI features: short code examples succinctly illustrate syntax and concepts, and more elaborate examples show how C++/CLI should be used
2023-08-24 09:35:10 2.56MB C++ CLI .NET
1
Visual C++/CLI从入门到精通 扫描版
2023-08-24 09:10:38 81.2MB C++ VC++ CLI C#
1