comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
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
  money maker         


Author: bella
Date: May 8, 2008 19:42

YOU KNOW THAT YOU SPEND AT LEAST $6.00 "EVERY PAY
PERIOD" ON USELESS STUFF, ME TOO. SO I THOUGHT, WHAT THE HECK, I'M
GOING TO TRY ONE OF THESE "SCAMS". NOW TO MY AMAZEMENT, I AM CHUCKLING
ALL THE WAY TO THE BANK WEEK AFTER WEEK WITH My PILES OF 1$ BILLS. I
AM HAVING FUN AT THE SAME TIME AND WISHING THAT I WOULD HAVE DONE THIS
SOONER! THIS IS LONG, SO IF YOU DON'T WANT TO READ IT ALL NOW, JUST
"COPY AND PASTE", IT IS
SOOO WORTH IT! DON'T TAKE MY WORD FOR IT, JUST TRY IT!
How to turn $6 into $6,000!
READING THIS COULD CHANGE YOUR LIFE! SO JUST DO IT! This really
works!
Hello, I’m like a lot of others out there who have
financial woes and I decided to try something new. If it works for me
then I will be able to get myself out of a very difficult financial
situation. Please read and see what results another got, it's pretty
exciting!
It REALLY CAN MAKE YOU EASY MONEY!! IT WORKS!!!
BUT YOU HAVE TO FOLLOW IT TO THE LETTER FOR IT TO WORK!!!!
I found this on a bulletin board and decided to try it. A little while
back, I was browsing through newsgroups and came across an article ...
Show full article (10.27Kb)
no comments
  Double dispatch (makes no sense!)         


Author: saneman
Date: May 8, 2008 17:20

I am trying to use double dispatch in the below code:

#include

class Box;
class Sphere;

class geometry_type
{
public:
virtual void haps(geometry_type* other)=0;
virtual void collideWith(Box* other)=0;
virtual void collideWith(Sphere* other) = 0;
};

class Box : public geometry_type
{
public :
Box() {}

virtual void haps(geometry_type* other)
{
other->collideWith(this);
}
Show full article (1.73Kb)
6 Comments
  Unpredictable nature of increment operators         


Author: bintom
Date: May 8, 2008 17:16

Why doe the following C++ code behaves as it does?

int i;

i=1; cout << (++i)++; Output: 2
i=1; cout << ++(++i); Output: 3
i=1; cout << (i++)++; Output: Error. LValue required
i=1; cout << ++(i++); Output: Error. LValue required
11 Comments
  Unpredictable result of Increment operation         


Author: bintom
Date: May 8, 2008 17:12

Is there any reason why the following C++ code behaves as it does ?

int i;

i=1; cout << (++i)++; Output: 2

i=1; cout << ++(++i); Output: 3

i=1; cout << (i++)++; Output: Error. LValue required

i=1; cout << ++(i++); Output: Error. LValue required
13 Comments
  default Enum values?         


Author: Travis
Date: May 8, 2008 15:37

I'm curious, if you have an enum say...

enum Days { Mon, Tue, Wed, Thu, Fri, Sat, Sun };

I understand the default will be Mon=0, Tue=1, Wed=2, etc.

What I'm curious about is if there is a Days attribute in a class,
what is the default assuming I don't do anything with it?

For example

class Foo
{
public:
Days week;
};

If I instantiate a Foo object, what is the default of week? Is there
any possibility (perhaps compiler dependent) that if I created and
destroyed Foo objects at an interval of less than 1 second, could
value of week change?

So for talking purposes say I have...
Show full article (0.76Kb)
7 Comments
  Binary Search Tree Problems         


Author: pleatofthepants
Date: May 8, 2008 15:20

I have a maxValue function that is called when I am removing a node
from my tree.

template
T BST :: maxValue (TreeNode* p)
{
if (p == NULL) throw ("BAD POINTER");

while (p-> right)
{
p = p-> right;
return *this;
}
}

I am getting this error when it compiles: cannot convert BST to
'int' in return
How do I fix this?
1 Comment
  Notation of "A Proposal to Add an Rvalue Reference to the C++ Language"         


Author: aitorf666
Date: May 8, 2008 12:53

Hi,
I have been reading the improvement that will be made to C++0x, and
one of this is "A Proposal to Add an Rvalue Reference to the C++
Language" , which will add a double &, for example:

int someFunction(int && a){ ...

the reason is to allow to change temporaries passed to functions. Due
to:

void f(int& a);
void ff(const int& a);
...
int x = 5;
f(x); //ok
ff(x); //ok
f(2); // error, not to make mistakes
ff(2); //ok

to can pass changeable temporaries, it has been proposed the syntax
int&&, which I thought is naughty.
void g(int&& a){ a = 0; }
g(2); //ok
Show full article (1.21Kb)
2 Comments
  Catching exit code before program termination         


Author: titanandrews
Date: May 8, 2008 09:05

Hi All,

Is there any way to catch the exit code from someone calling
exit(status) and check the value before the program terminates?

Just for an idea, the code I'm thinking of is something like this:

void exithandler()
{
DWORD exitCode = 0;
::GetExitCodeProcess(GetCurrentProcess(),&exitCode);
std::cout << exitCode << std::endl;
// prints 259, NOT 55
}

int _tmain(int argc, _TCHAR* argv[])
{
atexit(exithandler);
exit(55);
return 0;
}
Show full article (0.91Kb)
9 Comments
  Problem converting application from VS2003 to VS2005         


Author: kphip123
Date: May 8, 2008 08:15

Hi!

I recently converted an application from VS2003 to VS2005.
The application consists of a main 'unmanaged C++ executable' which
calls
a managed C++ .dll. The .dll basically launches a separate form.

The application use to work fine in VS2003. Now that I have converted
to VS2005 the main executable is working but an exception gets
thrown when it trys to call the .dll (basically the new separate form
never launches). The .dll was compiled with (/clr:oldSyntax).

This is the exception that gets thrown:

File: dbgheap.c
Line: 1414

Expression: _CrtIsValidHeapPointer(pUserData)

I click on Retry and it triggers a breakpoint at

if ( (oldsize = _msize_crt(*pbegin)) <= (size_t)((char *)(*pend) -
(char *)(*pbegin)) )

This is the call stack:
Show full article (1.88Kb)
1 Comment
  Re-launch of The Gadgets Forum         


Author: Blue Pikes
Date: May 8, 2008 06:20

Re-launch of The Gadgets Forum
------------------------------------------------

Re-launch of "The Gadgets Forum - gadgets.pk" with new and stunning
categories, now you can find latest news and reviews about the
following:

1) Audio/Video Gadgets = MP3 Players, iPods, Speakers, Audio/Video
Systems, Digital Cameras etc.

2) Automobile Gadgets

3) Cell Phones & Accessories

4) Laptops, Desktops & Accessories

5) Clocks & Watches

6) Gaming Gadgets

7) Geek Toys

8) GPS & Satellites

9) Home & Office Gadgets

10) Kitchen Gadgets

11) Solar Powered Gadgets

12) Travel & Power Gadgets

JOIN NOW http://www.gadgets.pk
no comments
 
1 2