First  |  Prev |  Next  |  Last
Pages: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Parsing binary wfstream file
Hi all, I was working on parsing a file created by Fortran which is fixed format. It is a wide stream binary file. I know that there are 6 integers which are made up of 4 characters each, followed by 2 doubles of 8 characters each. I am wondering what is the best way to convert the raw characters to integer ... 2 Apr 2010 07:05
warning: dereferencing pointer does break strict-aliasing rules
I get this warning while compiling the program below with g++-4.4.3: $ g++ -O2 -Wall In function �int main()�: test:8: warning: dereferencing pointer �<anonymous>� does break strict-aliasing rules /usr/include/c++/4.4/bits/stl_list.h:214: note: initialized from here I don�t see anything susp... 5 Apr 2010 19:27
Dot operator Overloading
Using function notation we have expressions like that: F(G(H(X))) Where we have to read from inside to outside. It is not so bad; this is the normal mathematical notation. However in some cases, I would prefer to read expression from left to right applying the next function in the previous result. H(x) ... 9 Apr 2010 16:43
Detecting pointer on the heap
I want detect if a pointer is pointing to memory on the heap or the stack, so I came up with this approach: bool isOnHeap(void * p) { int i = 0; int * s = &i; return (p > s); } I dont if this is the best or most portable way to do it. And im not sure how well it works for static and global v... 4 Apr 2010 17:03
performance of hash_map in combination with strings on vstudio 2003
Hello all, I am not sure if this is the correct newsgroup, but the information might be helpful. The (stdext::) hash_map in combination with strings (used on VStudio 2003 / vc7.1) does not have a good performance. It's actual slower than std::map<string, ...>. I noticed however that changing the hash function... 31 Mar 2010 12:05
const is an overrated concept that is a source of extra typing and maintenance
Seungbeom Kim wrote: I was saying that I was a bit hesitant to add or remove const depending on the implementation detail. Even though it does not affect the interface. Perhaps it's because, though const in the parameters for a function definition belongs to the realm of implementation detail, it doesn... 30 Mar 2010 21:49
ANNOUNCE: UPCRC Illinois Summer School on Multicore Programming
UPCRC Illinois Summer School on Multicore Programming, July 19-23, 2010 at the University of Illinois Urbana-Champaign. Apply to attend on-site or online. Deadline to apply: 5/15/10. More information online at: -- [ See 31 Mar 2010 17:41
Keeping types and functions in separate namespaces
Something that has been troubling me for a while: The current wisdom is that types should be kept in a namespace that only contains functions meant to be part of their non-member interface (see C++ Coding Standards [Sutter, Alexandrescu] or here t... 1 Apr 2010 10:07
Can I use overloading for optional parameters?
Hi, I need to provide a set of parameters to a function where one or more can be optional. Standard C++ can only provide default values for the last parameters and a default value representing N/A for references is not quite pleasant. I came up with an idea of overloading the optional parameters. Please give ... 1 Apr 2010 17:58
Static var in mixed C/C++ program. do you recommend?
Hi all, I'm writing a C/C++ program and i want to use a C written csv parser lib within it. This routines are being called normally, and, for each token, this parser calls a function. All is working ok, but i need to use a static variable to do some adm. tasks, and i think I'm broking the object-oriented paradig... 30 Mar 2010 07:12
First  |  Prev |  Next  |  Last
Pages: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40