Since 5/6/2012 5:11:38 PM, xgngli has written 5 articles and participated in 7 conversations. xgngli signature: xgngli
xgngli's articles:
Items(5) /1
Dereferencing (pointer to) iterator1239 (6/22/2007 9:55:17 PM) comp.lang.c++ Suppose we have a vector: vector vec(10); We can declare a iterator this way: vector::iterator vecItor; and then dereference it like this: for (vecItor = vec.begin(); vecItor != vec.end(); vecItor++) { c... xgngli
why dynamic_cast failed?624 (9/2/2006 8:48:26 PM) comp.lang.c++ Here I have four classes: RefBook and TextBook, which are inheritated from base class Book; and a class Database, which has an array to store the pointers to those two kinds of books. Now I am writing a member ... xgngli
the difference between "const char* s" and "char* const s"710 (8/23/2006 10:47:16 PM) comp.lang.c++ Hi all! I've taken some time on learning the difference between "pointers to const variables" and "const pointer variables". The question is: in the following code, can we change the contents of the const point... xgngli
the difference between "const char* s" and "char* const s"923 (8/23/2006 8:37:01 PM) comp.lang.c Hi all! I've taken some time on learning the difference between "pointers to const variables" and "const pointer variables". The question is: in the following code, can we change the contents of the const point... Gary
string copy. this one works, but why that one doesn't?616 (8/5/2006 8:31:47 PM) comp.lang.c I'm confused about the two ways of string copy below. The first one (two functions) works; the second doesn't. Can anybody explain the reason to me? Thanks a lot. #include /*this one works well void copy (cha... Gary
xgngli's replies:
Items(5) /1
why dynamic_cast failed?624 (9/2/2006 8:48:26 PM) comp.lang.c++ Here I have four classes: RefBook and TextBook, which are inheritated from base class Book; and a class Database, which has an array to store the pointers to those two kinds of books. Now I am writing a member ... xgngli(12)
Beginner question: how to free space of vector?1124 (6/22/2007 9:02:13 PM) comp.lang.c++ Hi, I have a problem with using vector to transfer new data into a class. Running valgrind on the following program gives lost memory, but I'm not sure why. Help appreciated, Matthias #include #include ... matth.schmitt
Dereferencing (pointer to) iterator1239 (6/22/2007 9:55:17 PM) comp.lang.c++ Suppose we have a vector: vector vec(10); We can declare a iterator this way: vector::iterator vecItor; and then dereference it like this: for (vecItor = vec.begin(); vecItor != vec.end(); vecItor++) { c... xgngli(12)
the difference between "const char* s" and "char* const s"923 (8/23/2006 8:37:01 PM) comp.lang.c Hi all! I've taken some time on learning the difference between "pointers to const variables" and "const pointer variables". The question is: in the following code, can we change the contents of the const point... xgngli(12)
the difference between "const char* s" and "char* const s"710 (8/23/2006 10:47:16 PM) comp.lang.c++ Hi all! I've taken some time on learning the difference between "pointers to const variables" and "const pointer variables". The question is: in the following code, can we change the contents of the const point... xgngli(12)