I understand the syntax and general semantics of pointers versus references, but how should I decide when it is more-or-less appropriate to use references or pointers in an API?
Is this a good way to delete a map of longs and objects made with new // iterate over the map for (std::map<unsigned long, Object*>::iterator it = obj开发者_运维技巧ects.begin(), it_end = objec
This might be rather simple but I have a method that expects a parameter to be of type BYTE **Ptr And for various reasons I am using an int* (we\'ll call intPtr for this example) in the code that wi
Ok this has been become sooo confusing to me. I just don\'t know what is wrong with this assignment: void *pa; void *pb;
I am trying to use the ANN (approximate nearest neighbor) library (the .dll) within my Delphi code. The library is written in C++, and although the data types are fairly simple I am having some troubl
edit: nevermind, solved...I\'d declared type in ClassB AND ClassC..开发者_运维知识库.. So I have a pointer, named PointA, in a class called ClassA.
Don\'t freak out about the length of my post, it\'s pretty simple, I just don\'t know how to put it any shorter:
This part of K&R (The C book) got me thinking: From the book: struct tnode { char *word; intcount; struct tnode *left;
I don\'t understan开发者_如何转开发d pointers and references very well yet, but I have a class with static methods and variables that will be referenced from main and other classes. I have a variable
I\'m new to C and trying to learn a few things. What I\'m trying to do is read in a file and store the information. Since the format will be a CSV, the plan is to read in each character, determine if