comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
December 2007
motuwethfrsasuw
     12 48
3456789 49
10111213141516 50
17181920212223 51
24252627282930 52
31       1
2007
 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
  Get some extra pocket money too as a YouMinter         


Author: Soni009
Date: Dec 3, 2007 22:31

Join before December 9, 2007 and win an i-Pod!
Get SMS Ads, discounts and offers based on your interests.
Get some extra pocket money too as a YouMinter.
Get customised wallpapers and screensavers for your phone at no cost.

http://www.youmint.com/network-sonialkesh

YouMint lets you send 450 SMS to YouMinters across India worth approx
Rs. 900. YouMint also lets you make some extra pocket money for
receiving SMS Ads. YouMint is backed by international investors of
great fame and the same guys who started the mobile short code
revolution in India!
no comments
  return value optimization         


Author: aaragon
Date: Dec 3, 2007 21:26

Hi,

I'm designing a Matrix class so I read what Bjarne Stroustrup has on
section 22.4.6 about it. It shows that it is possible to eliminate the
temporaries by delaying the construction of the object. In his example
(page 675):

struct MVmul {
const Matrix& m;
const Vector& m;

MVmul(const Matrix& mm, const Vector& vv) : (mm), v(vv) { }
operator Vector(); // evaluate and return result
};

inline MVmul operator*(const Matrix& mm, const Vector& vv)
{
return MVmul(mm,vv);
}

Now, I think that's cool, however, I have a question about the
converting function operator Vector(). The implementation could be
done there OR it can be done as a constructor of the Vector class,
right? Something like this:
Show full article (1.05Kb)
4 Comments
  undefined reference error while linking..help         


Author: yeah
Date: Dec 3, 2007 21:16

hi friends

I tried to link c++ object files using "bfin-elf-ld" and got some
undefined reference errors
Errors:::::
(.text+0x2ee8): undefined reference to `operator delete(void*)'
(.text+0x2ef4): undefined reference to `_Unwind_Resume'
(.text+0x2efa): undefined reference to `operator new(unsigned long)'
(.text+0x25f6): undefined reference to `__muldf3'
(.text+0x2620): undefined reference to `__floatsidf'

I dont know why its giving these errors..
Plz help me to fix this

thanks in advance
1 Comment
  Re: C++ HTMl Encoding/Decoding Library         


Author: Rahul
Date: Dec 3, 2007 19:08

On Dec 4, 6:11 am, tushar.sax...@gmail.com wrote:
> Hi,
>
> I've been looking around for a library to encode/decode HTML entities
> similar to the HTML::Entities that can be used with Perl.
>
> i.e. "& amp ;" should be converted to "&" and vice versa (although the
> reverse direction isnt that important"
>
> I suppose I can write up a small class to do this myself, but I was
> wondering if such a library exists.
>
> Thx !
>
> Tushar

Could consider parser tools like lex, yacc, bison for decoding...
no comments
  classes containing operator() for std::sort, and virtual functions         


Author: Markus Dehmann
Date: Dec 3, 2007 18:48

In the following code example, I define several Comparator classes
which contain different compare functions to use with std::sort. I
have a Sorter class that gets passed a Comparator and is supposed to
sort using the specific Comparator that's passed to it.

But it always uses the Comparator base class and not the derived class
that it is supposed to use, although the functions are virtual.

How can I make the code work? You might argue that a Sorter class is
not needed, but I want one because I have more data and operations
related to sorting that I would like to put there.

#include
#include

class Comparator {
public:
virtual bool operator() (const int& i1, const int& i2) const {
return i1 < i2;
}
};
Show full article (1.41Kb)
1 Comment
  OT:MSDN broken?         


Author: fcbayern_owp
Date: Dec 3, 2007 13:15

For several days i've been unable to access

http:/msdn.microsoft.com

Receiving error :
http://msdn2.microsoft.com/Message-Error.htm?aspxerrorpath=/

Runtime Error
Description: An application error occurred on the server. The current
custom
error settings for this application prevent the details of the
application
error from being viewed remotely (for security reasons). It could,
however,
be viewed by browsers running on the local server machine.
Show full article (0.83Kb)
2 Comments
  function prototype         


Author: Art Cummings
Date: Dec 3, 2007 12:33

Hello all,

I'm trying to write a function prototype that includes an array of
structures. I'm not sure how to write it. I'm also not sure what the call
to a function that uses this prototype would look like. From what i've read
on the web, it needs to be a pointer to an array. I'm not sure even where
to begin. I've written function protoypes for arrays and 2d arrays but when
I write it for the structure, i get compiler errors.

any help...

Thanks
Art
22 Comments
  msvc vs minGW         


Author: CodeGrommet
Date: Dec 3, 2007 12:05

I have a mate who wants to share code that he compiled with msvc. I
want to add those files in a project in dev-c++ using the minGW
compiler. The project uses glui libs. I've set the project options
to point to the correct locations. Anyone with ideas on how to get
this to work, apart from downloading msvc?
2 Comments
  Pointer to Function Failed         


Author: Bryan Parkoff
Date: Dec 3, 2007 11:42

I created global variable for pointer to function. Set_pf() function is
to copy Test() function into global variable of pf(). The main() function
starts before Set_pf() function is executed. The Pointer_To_Function
variable copied into pf variable without any problem. pf() function has
memory address to have a pointer to function of Test() function. The
problem is that when Set_pf() function is exited before pf variable is set
to zero automatically that it is not supposed to do. Then, pf() function
inside main() function attempts to execute before crash occured with illegal
memory. Is there a way to fix to prevent pf() variable to set zero
automatically? Here is my source code below.

void (*pf)(void);

void Test(void)

{

int a = 5;

}

void Set_pf(void (*Pointer_To_Function)(void))

{

void (*pf)(void) = Pointer_To_Function;

pf(); // Execute is fine.
Show full article (1.11Kb)
2 Comments
  STL: Could you make this snippet more efficient         


Author: pedagani
Date: Dec 3, 2007 11:30

Dear comp.lang.c++,

Could you make this snippet more efficient? As you see I have too many
variables introduced in the code.

//Read set of integers from a file on line by line basis in a STL set
//fp is pre-defined
for(;!fp.eof();)
{
string linestr;
getline(fp,linestr);
istringstream strstreamline(linestr);
istream_iterator intstream(strstreamline);
set pckset;
copy ( intstream , istream_iterator() ,
inserter(modpckset,modpckset.begin ( ) ));
}

Thanks in advance.
11 Comments
1 2 3 4