Static Region Allocator...127 (6/17/2008 10:33:08 PM) comp.lang.c++ This region allocator is not dynamic and can be fed with a buffer residing on the stack of the calling thread. Therefore, you can use this in an environment which does not have a heap; its basically analogous... Chris
is this code valid?2533 (6/3/2008 5:41:32 PM) comp.lang.c++ The following code compiles fine with GCC, Comeau, EDG/C++ and VC++ 8/9: #include #include int main() { { std::string names[3] = { "One", "Two", "Three" }; } std::puts("\n\npress to exit..."); ... Chris
default template arguments...046 (6/3/2008 1:41:42 PM) comp.lang.c++ Is the following use of default template arguments Kosher? _______________________________________________________________ template struct active { T object; struct guard { T& object; guard(T& _o... Chris
standard memory allocator alignment issue...3245 (5/12/2008 6:13:16 AM) comp.lang.c How many C compilers provide extensions which allow for a standard implementation of the following hack? ____________________________________________________________________ #include typedef union aligner_t... Chris
Simple Single-Threaded Region Allocator...1138 (5/2/2008 12:35:23 AM) comp.lang.c Here is the code: http://pastebin.com/m4a405e67 One advantage to using a region allocator is that you can usually skip most calls to free. Instead you can merge multiple free calls into a single reset cal... Chris
Simple General-Purpose Dynamic Region Allocator...350 (4/21/2008 1:54:12 PM) comp.lang.c++ Here is the VERY crude initial code: http://pastebin.com/m2dacea67 The allocator overloads the global new/delete operators when 'TEST_USE_REGION_ALLOCATOR' is defined. This makes it easier to fit into the ... Chris
lifetime of const references...245 (4/8/2008 8:59:45 PM) comp.lang.c++ Here is the code which should compile fine; program output and my question follows: ____________________________________________________________________ #include namespace func_ptr { namespace sys { t... Chris
valid static-initializer list values...548 (3/19/2008 4:52:41 AM) comp.lang.c Simple question, does the program below fall victim to undefined-behavior? ___________________________________________________________________ #include #include typedef struct fooa_s fooa; typedef struct fo... Chris
Crazy macro-based doubly-linked list...744 (2/27/2008 10:09:20 PM) comp.lang.c Here is the code: ** WARNING ** - Reading this might make your eyes squirt blood all over the room! http://appcore.home.comcast.net/misc/dlist_macro_h.html You use it like a intrusive C++ template-based co... Chris
destroying objects1438 (6/11/2008 6:11:24 PM) comp.lang.c This program simply reads a list of employes from the user, prints it and then destroys the allocated memory. I have a function free_memory(void *ptr) which will free the memory pointed to by pointer ptr. I inc... Broli00(348)
Parallel multithreading for I/O operation in linux ?743 (6/11/2008 7:26:56 PM) comp.lang.c At first we should mention that we have a one-processor, linux-machine (Kernel 2.6.23) and developing an I/O application using g++. The problem: we have a task :"reader" which should read sequentially some dat... jurij.ivastsuk(4)
Are so many subclasses such a good idea?1740 (6/12/2008 8:51:12 PM) comp.lang.c++ Hi folks, I noticed that the standard library has a bunch of subclasses like std::bad_alloc, std::runtime_error that derive from std::exception. I gather that in order to use one of these error subclasses, on... khapi(6)
fopen2441 (6/16/2008 8:44:37 PM) comp.lang.c I have a question about fopen. I want to append text to a text file already written. I think this is what I need to do. If I am correct fopen's second parameter takes only 2 letters. I am using wt. To app... nospam268(588)
Static Region Allocator...127 (6/17/2008 10:33:08 PM) comp.lang.c++ This region allocator is not dynamic and can be fed with a buffer residing on the stack of the calling thread. Therefore, you can use this in an environment which does not have a heap; its basically analogous... cristom(952)
concatenate a constant to constant string using macros1394 (6/18/2008 2:35:55 AM) comp.lang.c hi, how to concatenate a "hash defined" constant value to another "hash defined" constant string. For example #define ABC 100 #define MYSTR "The value of ABC is" Now i need a string that will concatenate the... sinbad.sinbad(155)
Pedants177119 (6/21/2008 10:11:31 AM) comp.lang.c Dear pedantic user What is a pedant? According to dictionary.com you are: 1. a person who makes an excessive or inappropriate display of learning. 2. a person who overemphasizes rules or minor details. 3. a ... jacob4111(1334)
c++ mastermind game console app248 (6/22/2008 9:23:44 AM) comp.lang.c++ /* * Mastermind * * Author: Gerald Cruz * * Date: June 21, 2008 * */ #include #include #include #include #define CODELEN 4 // length of code #define NUMSYM 6 // number of symbols #define MAXTR... FilDev(1)
Portable C++ GUI framework5234 (6/26/2008 8:18:31 AM) comp.lang.c++ I think this is on topic here, because it is about C++ and available portable C++ GUI frameworks. I am looking for a decent portable C++ (meaning C++ API, not C) GUI framework that works both on Linux and Win... ivranos(429)