Since 4/27/2012 4:25:06 AM, lruss has written 5 articles and participated in 577 conversations. lruss signature: lruss
lruss's articles:
Items(5) /1
Explicit type conversion.525 (4/22/2009 6:11:55 PM) comp.lang.c++ I've gotten an error message from this snippet: void f() { unsigned int x = unsigned int (5); } N2857, 5.2.3 Explicit type conversion (functional notation), seems to imply that this is valid code, but pe... LR
Formatting a real with an I edit descriptor.1443 (4/21/2009 1:50:39 PM) comp.lang.fortran Another thread in another group aroused my curiosity. I was wondering what this snippet should produce according to the standard. (I've been reading a working draft from 2004, but whatever the latest version s... LR
How many complain?1424 (10/27/2007 1:26:57 PM) comp.lang.c++ I don't know if this is OT or not, but I was curious, so I'm going to ask anyway. Forgive me. How many of you complain about egregious off topic posting? Of course, what each of us considers to be egregious ... LR
Question about exceptions.939 (9/9/2007 7:45:30 PM) comp.lang.c++ Is this code valid? And if so, what should the output be? #include #include int divide(const int a) { std::cout << "1 divide(" << a << ")" << std::endl; if(a == 0) throw std::exception()... LR
New code search feature at Google.229 (10/5/2006 11:01:11 PM) comp.lang.c++ I'm not 100% sure this is on topic, but I think it's an interesting resource. I haven't found a link to this from Google's home page, but it seems to be up and working. Search for code, using regular expres... LR
Unexpected pointer action431 (12/30/2011 7:31:26 PM) comp.lang.c++ A friend told me that he had read somewhere that giving pointers to an average programmer is like giving a gun to a 6 year old. Since I got the wrong answer for the problem below I must be an average programmer... jvh75021(21)
noob question - destructors - freeing memory...7719 (12/31/2011 1:43:28 AM) comp.lang.c++ Hi See this (stolen from the internet): ---------------------------------------- #include using namespace std; class Base { public: Base(){ cout<<"Constructing Base"<<endl;} // this is a destructor: ... newsboost(219)
comparing floating point numbers #21630 (1/29/2012 6:48:27 PM) comp.lang.c++ Hi, I have seen code that compers like that : if (b == 0.0 && (a == 0.25 || a == -0.75)) so I have checked it : #include using namespace std; int main() { cout << boolalpha << "The true e... adammaj1(14)
if #2842 (2/2/2012 10:13:13 AM) comp.lang.c++ Hi I only want either first or second if but not both executed. ie. if value 1 do not execute 2 even if 2nd value ==1 but also if 2nd do not execute first if. Thanks if (R22value == 1){ DreiDimensional ... ahso47(55)
moving template implementation to cpp234 (2/4/2012 5:32:29 AM) comp.lang.c++ This is about a template linking problem: Below we have a struct TS1, a template class TC1 and a non-template class TC2. TC2::f() calls TC1::f(), it compiles, but linker brings error. I don't understand why, n... for-usenet(11)
returning a type514 (2/5/2012 8:52:29 PM) comp.lang.c++ Three questions regarding type information: 1) Is it possible that a userfunction returns the type of an object (instead of the object itself), so that it can be used in a declaration or definition? Something ... for-usenet(11)
constructor not being called?220 (11/21/2011 1:30:22 AM) comp.lang.c++ I'm trying to implement a value-like pointer class as in Lippman et al. chapter 13. To make things easier to track, the pointer member points to a class named Signified that's merely a wrapper for a string, w... buszard(2)