comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c++ Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Shootout (fannkuch)         


Author: Razii
Date: May 4, 2008 23:54

On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
yahoo.com> wrote:
>Why don't you go through all...

This time I am going to demonstrate a very serious problem with the
shootout site.

The algorithms used by C, C++, and D are BETTER than the Java
versions! What the heck? In some cases Java version is so bad that
it's 10 times slower.

Let's start over again. We go through the list one by one.

You have this version of Java for fannkuch

http://shootout.alioth.debian.org/gp4/benchmark.php?test=fannkuch&lang=java&id=2

I wrote a different version (algorithm used by Heiner Marxen)

http://pastebin.com/f41c2ef6f

When n = 11

0m10.165s -client (old version)
0m6.064s -client (this new version)

4 seconds faster...

Let's compare it now with C++ version

http://shootout.alioth.debian.org/gp4/benchmark.php?test=fannkuch&lang=gpp&id=2
Show full article (1.27Kb)
43 Comments
  Can not find what I missed with return value         


Author: david
Date: May 4, 2008 23:23

I wrote one function which is used to count comment and code lines and
it works as it should be, but when compiling I get warning (i686-apple-
darwin9-g++-4.0.1):

pirma.cpp: In function ‘int CheckLine(const std::string&, int&)’:
pirma.cpp:112: warning: control reaches end of non-void function

So, it looks like somehow it still can get to the end of the function,
the problem is that I can not figure out that I could have missed.
This way I added return UNDEFINED at the end of the function, but I
still would like to get the answer what I could have missed.

The whole function has only new local variables and if structure:
int CheckLine(const string &line, int &status) {
string::size_type startPos;
bool emptyStatus = true;
Show full article (1.00Kb)
2 Comments
  Great Indian Developer Awards 2008         


Author: john
Date: May 4, 2008 22:00

Great Indian Developer Awards 2008

Vote for your favorite trailblazing individuals & products in the IT
Developer ecosystem and win exciting prizes!

Prizes include: Apple Mac Air Book, 26" PLASMA TV, NOKIA95 8 GB, APPLE
iPOD 80Gb, ZEST HOLIDAYS, GIDS GOODIES.

The Great Indian Developer Awards is a first-of-its-kind initiative
that honors individual & organisational excellence in the IT Developer
ecosystem. Just click and cast your vote. With over 15 categories & a
distinguished independent jury, who knows... it could be your
colleague, company or product that will emerge triumphant. And you get
to go home with cool goodies as well! Hurry!

Click here to vote for the Great Indian Developer Awards:
http://www.developersummit.com/awards.html#vote
Show full article (1.40Kb)
no comments
  OS         


Author: SandyDTechie
Date: May 4, 2008 21:01

I got a question which was asked by my M.Tech compsci cousin.....
Which is the easiest way to divide by 2 from the OS perspective???
2 Comments
  equality operator question         


Author: barcaroller
Date: May 4, 2008 19:40

Is it now common practice to use conditional statements like

if (0 == i)
if (-1 == i)
if (true == i)
if (5 == i)

over the more traditional statements like

if (i == 0)
if (i == -1)
if (i == true)
if (i == 5)

for all types of 'i' (PODs and classes)?
41 Comments
  TOP 10 graphic card According to standard benchmark 3DMark Software         


Author: speedman2010
Date: May 4, 2008 07:07

TOP 10 graphic card According to standard benchmark 3DMark Software
To read more go to http://computerworld4y.blogspot.com
no comments
  Troubles in porting Apache STDCXX         


Author: Pegasus
Date: May 4, 2008 00:47

Good morning, I'm Filippo Battaglia. We're porting Apache STDCXX
under Nanodesktop. We are trying to make nd compatible also with
C++ and not only with C.

Unfortunately, we're finding different technical troubles in the
compilation.

So, can anyone of the developers tell with me ? So, I can solve
the troubles step by step and I can obtain a working version of
the library.

Your library is critical for Visilab Research, because, if it works,
we can port Tesseract under nd and Blind Assistant will be
completed.

PLEASE, anyone can help me ? It's very, very important.

Thanks in advance
Filippo Battaglia
1 Comment
  question on map<K, V>::insert(iterator, const value& v)         


Author: subramanian100in
Date: May 4, 2008 00:16

consider the following program:

#include
#include
#include
#include
#include

using namespace std;

int main()
{
typedef map container_type;

container_type m;

m[0] = "zero";
m[1] = "one";
m[2] = "two";

container_type::iterator it = m.find(0);

++it;
++it;

container_type::iterator res = m.insert(m.end(), make_pair(0,
"Test"));
Show full article (1.37Kb)
1 Comment
  ===Welcome to comp.lang.c++! Read this first.         


Author: Shiva
Date: May 3, 2008 21:29

Welcome to comp.lang.c++! Read this first.

This post is intended to give the new reader an introduction to reading
and posting in this newsgroup. We respectfully request that you read
all the way through this post, as it helps make for a more pleasant
and useful group for everyone.

First of all, please keep in mind that comp.lang.c++ is a group for discussion
of general issues of the C++ programming language, as defined by the ANSI/ISO
language standard. If you have a problem that is specific to a particular system
or compiler, you are much more likely to get complete and accurate answers in a
group that specializes in your platform. A listing of some newsgroups is given
at the end of this post.

The FAQ (Frequently Asked Question) list has a wealth of information for
both the new and veteran C++ programmer. No matter what your experience
level, you are encouraged to read the entire list, if only to familiarize
yourself with what answers are available to minimize redundant replies.
The comp.lang.c++ FAQ is available at http://www.parashift.com/c++-faq-lite/

If the FAQ list does not help, then many regular readers of this group
are happy to assist with problems of standard C++. We have only a few
requests that we ask be adhered to, for the benefit of all:
Show full article (4.94Kb)
no comments
  A question on Gtkmm's         


Author: jalqadir
Date: May 3, 2008 16:50

I would like to add a signal to a Gtk::Entry object, but for some
reason this gives me bunch of errors saying that it is

D:\XWin\include\sigc++-2.0\sigc++\adaptors\adaptor_trait.h|84|error:
no match for call to `(sigc::bound_mem_functor0)
(GdkEventFocus* const&)'

I using Gtkmm 2.10.x for Windows
Thanks in advance!

Can any body help?!
namespace jve{
class Entry: virtual public Gtk::VBox {
Show full article (0.93Kb)
2 Comments
 
1 2 3 4 5 6 7 8 9