Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
comp . lang . c++ . moderated
This is a Usenet group - learn more
Find or start a Google Group about c++.
Group info
Language: English
Group categories:
Computers > Programming
More group info »
Related Groups
Discussion about C++ language, library, standards. (Moderated)
Low activity, Usenet
The object-oriented C++ language.
High activity, Usenet
The C programming language. (Moderated)
Low activity, Usenet
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 25703  Older »
Description: Technical discussion of the C++ language. (Moderated)
 

How to create functions with generic/parametrized operators 
  I am trying to do something, which I think is not possible to do in C+ +. This is what I want to accomplish (pseudo code) parameter <op> func() { for i loop for j loop for k loop x[G(i,j,k)] = x[H(i,j,k)] <op> y[I(i,j,k)] end loop end loop end loop ...main() { func<+>() or func<'+'>()... more »
By banu  - 9:18pm - 1 new of 1 message    

removing from set - does it have to be so ugly? 
  std::set<Stuff>::iterator current_item( stuff_set.begin() ); while ( current_item != stuff_set.end() ) { if ( is_bad( *item ) ) { std::set<Stuff>::iterator previous_item( --current_item ); stuff_set.erase( ++current_item ); current_item = previous_item; } ++current_item; ...Is this the best way I can structure this? I hate writing code like... more »
By Alfons  - 3:47am - 6 new of 6 messages    

boost multi index - possible? 
  Hi, I have a map of a set of strings and a double. map<set<string>,double> Typical entries are like this: (a1,b1,c1) -> 10 ; (a1,b1,c2)->2.5 (a1,b1,c2)-> 3 Of course if i give full set as the key, i can get the value. But if i want all entries containing say a1, how to do it? Is it possible to do this through boost::multi-index? I am unable to make out by reading... more »
By suresh.amritapuri  - 3:44am - 2 new of 2 messages    

Const and usage during compile time 
  const int i[] = {10, 12, 18, 20} //The below isn't legal, the text says because the array above being const, it can't be used at compile time, and the error is "error C2057: expected constant expression". It seems (I tried it) it can't be done whether the array above is const or not, the (here float)array... more »
By krishna  - 3:37am - 3 new of 3 messages    

Using array of function pointers 
  int main(int argc, char **argv) { std::string (* fp[]) (int) = {binary}; std::cout << fp[0] << std::endl << fp[1]; ...This compiles (in visual studio 2008 express) but fails with run-time error. Why? Thanks, Krishna. P.S. This is not a homework question.
By krishna  - 3:36am - 2 new of 2 messages    

question on function overloading 
  Hi, I have a class A which is the base class. I have class B which is derived class of A. Class A does not have a default constructor(reason it is a class in c+ + library). I am trying to overload a function of class A in class B and it gives me an error saying there is no appropriate default constructor... more »
By raksha  - Nov 11 - 6 new of 6 messages    

Virtual inheritance and typedef 
  Hi, In the book _C++ Templates: The Complete Guide_ (2003), Vandevoorde and Josuttis devote section 16.1 (pages 285-9) to a technique for implementing "Named Template Arguments". The full code is too long to quote, but can be accessed at the book's website: [link],... more »
By Trevor Vaughan  - Nov 11 - 4 new of 4 messages    

shared_ptr declaration in if-statement ? 
  Hi all. // With a pointer I can do: if(MyWhatever* pX = get_whatever()) { ...However, for this to work with a shared pointer (shared_ptr or scoped_ptr from boost) I have to do: if(shared_ptr<MyWhatever> pX = shared_ptr<MyWhatever>(get_wha tever())) { ...This is ugly (and presumably could also add some runtime overhead).... more »
By Martin B.  - Nov 11 - 6 new of 6 messages    

Arguement against NULLing a pointer after delete? 
  I seem to remember reading through the C++ FAQ Lite and reading an arguement against setting a pointer to NULL after delete. Is there such an arguement or did I imagine the whole thing? Thanks Allan
By yodadrinkslager  - Nov 11 - 11 new of 11 messages    

Article: On Iteration 
  I wrote an article that may be of interest on InformIt; it got mentioned on reddit.com. Due to the vagaries of posting time and reddit dynamics, the article didn't stay long on reddit's programming page so it got very few views and comments. [link] Please comment here and/or there and vote up if you liked it.... more »
By Andrei Alexandrescu  - Nov 11 - 1 new of 1 message    

1 - 10 of 25703   « Newer | Older »

XML      
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google