Bad optimisation with microcontroller compilers348 (7/18/2011 9:25:54 AM) comp.lang.c When I'm writing an eternal loop in C, I always do: for (;;) { /* code */ } I've been using the PIC C compiler recently for PIC microcontrollers, and I've found out that it completely removes all loops f... Virchanza
This is a test041 (6/29/2011 5:09:16 PM) comp.lang.c++ Yes I realise there's alt.test but I'm specifically testing it here because my 3 last posts haven't shown up on this newsgroup. ... Virchanza
Just Curious....... Why no :: for objects?732 (5/15/2011 6:47:40 PM) comp.lang.c++ I'm just curious about why you can't do the following: vector vec; for ( vec::iterator it = vec.begin(); it != vec.end; ++it ) { } Would it not be handy to be able to use :: on objects? ... Virchanza
Ideas for writing a "Combinator"324 (4/19/2011 10:12:26 PM) comp.lang.c++ One way of counting to 999 is to use loops within loops as follows: for (unsigned i = 0; i != 10; ++i) for (unsigned j = 0; j != 10; ++j) for (unsigned k = 0; k != 10; ++k) ... Virchanza
Compiling multi-threaded programs with the GNU compiler suite828 (4/4/2011 12:28:35 AM) comp.lang.c++ I have a program that's written primarily in C++, and a small portion of it in C. My program uses the wxWidgets application framework, which provides functionality for stuff like graphical user interfaces and... Virchanza
vector, but without the overhead of dynamic memory allocation627 (3/9/2011 3:25:57 AM) comp.lang.c++ I'm currently writing a program that deals with containers which contain containers which contain containers. I'm simplifying things here a bit, but what I have is something like: class Port_Data {}; class ... Virchanza
new(nothrow not even from constructor)13143 (12/19/2010 11:55:48 AM) comp.lang.c++
I've been looking through the Dinkumware reference manual and I
can't find a form of "new" that doesn't throw any exceptions at all.
I'm currently writing a program that uses the "new" operator to... Virchanza
Using <algorithm> with null-terminated arrays7144 (12/18/2010 4:11:17 PM) comp.lang.c++
I'm cleaning up some old code of mine, I want to use functions
from instead of using my own hand-coded algorithms for
searching and sorting. (I had been programming in C++ for a few years
before I act... Virchanza
How to "reset" an object3212 (6/19/2010 9:58:20 AM) comp.lang.c++ Let's say I have a struct as follows: [code] struct MyStruct{ int a; double b; std::string str; }; [/code] And let's say I create a global object of it which has all of its members (including... Virchanza
Need to use "volatile" for accessing variables between threads?2234 (7/27/2009 7:40:58 AM) comp.lang.c++ Let's say I have a global variable: int g_counter; And let's say that this variable is accessed by two different threads. Here's how the threads might look: void Thread_One(void) { for (... Virchanza
Type length in bits?5129 (4/24/2011 6:45:31 AM) comp.lang.c++ What is a standard way to get the "length in bits" (in the sense of 5.8/1) of a type? -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time pos... BigMan(211)
Why C++ is vastly superior to C23674 (5/16/2011 3:08:47 PM) comp.lang.c++ Why C++ is vastly superior to C: http://warp.povusers.org/programming/cplusplus_superior_to_c.html "In conclusion, the reason why C is so vastly inferior to C++ as described in this article can be summari... lmc(187)
Is C++ suitable for GUI programs?2430 (6/24/2011 6:28:07 AM) comp.lang.c++ So I've heard that creating GUI programs in C++ is quite difficult. I need to implement JPEG with a GUI to select settings and display the image. We're encouraged to use Visual C++ or Java because they're mo... mechian31(1)
Virtual functions in constructors. Is it possible?2127 (7/1/2011 10:19:12 PM) comp.lang.c++ Is it possible to call a virtual function as Init() in a constructor? So that I could write something like this: { Base a ; // calls Base::Init Derived b ; // calls Derived::Init } Ok, before answerin... anonymous7352(16)
compile C programs for both sunstudio and Visual studio2522 (7/18/2011 3:49:38 AM) comp.lang.c I comile C programs for bothe platforms : sunstudio using cc , visual studio 6 . Is there a command to differeniate which platform I compile for . That in order to use the the system command . For example : I... ehabaziz2001(345)
Bad optimisation with microcontroller compilers348 (7/18/2011 9:25:54 AM) comp.lang.c When I'm writing an eternal loop in C, I always do: for (;;) { /* code */ } I've been using the PIC C compiler recently for PIC microcontrollers, and I've found out that it completely removes all loops f... virtual(44)
Is the C++ standard freely available somewhere?618 (7/20/2011 4:43:16 PM) comp.lang.c++ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message Is the C++ standard freely available somewhere? -- Kari Laine PICs, Displays,Relays - USB-SPI-I2C http://ww... karitlaine(1053)
const/non const member function vs. templates1320 (7/26/2011 12:58:21 PM) comp.lang.c++ Hi Together! In some (partly legacy) code I have member functions like this: // class Dummy (class of any type). class XY { Dummy *pGetMe( (returns pointer to some ); ... mkeppeler
real world sizeof bugs2028 (8/24/2011 5:29:42 PM) comp.lang.c Because the issue gets discussed here on a semi-monthly basis, I thought the following real-world example might be worth posting. The code belongs to the c-ares project, which is used in much FLOSS and commerci... William