Erasing in a vector while iterating through it317 (6/11/2007 2:41:37 PM) comp.lang.c++ I have some code where there's this vector of pointers to objects and I need to delete and erase some of them, the problem is that to know which I need to iterate through the vector and I'm trying to do this as... iso
Debugging tools for inspecting the stack354 (5/16/2007 8:59:02 PM) comp.os.linux.misc As part of a small project in school I need to inspect the stack of a running program in more detail than bt in gdb allows. What I'd like is to get a dump of the memory containing the stack (preferably in some ... iso
References to temporaries and function-calls1116 (2/15/2007 1:16:30 PM) comp.lang.c++ struct foo { int i; }; int bar(foo& f) { return f.i++; } int main() { bar(foo()); } The above code does not compile since you can't bind a reference to a temporary, you could solve this by using a 'con... iso
Partial specialisation of method taking parameterized parameter323 (12/20/2006 1:00:45 PM) comp.lang.c++ I'd like to create a partial specialization of a member-method of a parameterized class which takes a parameterized argument, but I'm not sure if it's possible or, if possible, how. The following code demonstra... iso
Pointer to operator for builtin types621 (12/15/2006 9:13:35 AM) comp.lang.c++ Is there some way to get a function-pointer to the operators of the builtin types? In the following example I have a generic function which applies an operator on two values, however it does not work on builtin... iso
To inherit or not, that is the question216 (12/14/2006 8:21:18 AM) comp.lang.c++ I'm working on a project where I need a couple of classes that purely conceptually are related to each other such that I could create a base-class and have a is-a relation between each of the classes and the ba... iso
Template template parameters #2329 (12/13/2006 12:12:32 PM) comp.lang.c++ I'm quite new to template template programming and while trying to write a function I discovered a small oddity, the following code demonstrates this: #include template class Cont_> // HERE Val_ sum(Cont_& ... eriwik
Returning a template argument522 (12/8/2006 1:11:58 PM) comp.lang.c++ Consider this: #include template struct test { const int& get() { return A; } } int main() { test t; std::cout << t.get(); } 1=2E Is it legal (it compiles under VC++8). 2=2E Is it a good idea? At fir... eriwik
Using subscripts in function-parameter names126 (11/26/2006 8:57:32 AM) comp.soft-sys.math.mathematica I'm quite new to using Mathematica and I'll probably not use it much in
the future either, but right now I need to use it to calculate some
values for comparison. My problem is that I can't get seem to get a
... eriwik
Memory vs Performance?620 (6/12/2007 9:03:43 AM) comp.lang.c++ Hi, Need views on the following.. I need to design a data structure to store the values of n attributes, where n is something near 20. Now, all the attributes are optional. So, at times, i may have to store t... coolmohitz(20)
Basic question on exception handling in C++332 (6/12/2007 1:04:36 PM) comp.lang.c++ In all the sample code snippets of try-catch code blocks that I have seen, the catch block does one of the following three things: 1). exits the program (after spitting out a cerr message) 2). propagates the ... masood.iqbal(34)
hash_map #41128 (6/14/2007 12:16:47 AM) comp.lang.c++ Hello everyone, I have a VERY BIG set of double values that I want to map to intervals so I thought a clever way to do this was using a hash table. Let's say that I want to map all double values in the range 0... alejandro.aragon(204)
Array using STL719 (6/14/2007 4:00:45 AM) comp.lang.c++ I have a question, which must surely have occurred to many programmers since STL first appeared, and yet I have found no reference to it anywhere, suggesting the problem is insoluble. Nevertheless, here it is... huw2787(3)
Single instances?725 (6/14/2007 4:30:56 AM) comp.lang.c++ Hi, How to create an applications that cannot have multiple instances running on the same machine for the same user? Thanks. ... sumsin123(28)
extracting file from the file descriptor327 (6/14/2007 10:38:01 AM) comp.lang.c++ I am using Linux gcc 4.1.1 version I have a file descriptor and I want to have a FILE* pointer to the file from the file descriptor. OR if I can have the file name using the file descriptor.. Please help.. ... akaarj
size of class532 (6/14/2007 11:25:49 AM) comp.lang.c++ have a look at the sample code class myTest { private: int i; int d; }; class myTest2:myTest { private: int i; int d; }; int _main() { int s = sizeof(myTest2); return 0; } -->why is s value will be 16.Th... subkriskat(2)
Function Overloading #41426 (6/14/2007 12:05:24 PM) comp.lang.c++ I have one question. Can I catch exception in function overloading.In my programm i want to create two function with same signature and same return type. I know its not possible...can i use try.catch .block to ... sahgalpramods(21)