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
  char_traits of user defined "char" type         


Author: multics.cn
Date: Dec 27, 2007 23:24

Good day, c++ guys.

I have a question about char_traits of user defined "char" type. I
need a string type, which supports "long" as its "char" type, so I
defined a lstring like this:

typedef basic_string lstring;

but I did not define template <> char_traits {...};
It seems following code works:

lstring aLongString;
int aLongString.length();

I do not quite understand the roll of char_traits, can anyone help to
clearify?

Thanks.
1 Comment
  Calling a function only once         


Author: Mark
Date: Dec 27, 2007 22:21

This is just out of curiosity...

There are a couple ways to make sure a function gets called only once.
Let's say I have a function that gets called several times, called
LoopedFunc() and I have another function called Init() which I only
want to run once... then I can do

LoopedFunc()
{
static bool initialized = false;
if(!initialized) {
Init();
initialized = true;
}
}

or...I can make my Init() function return a boolean and then go

LoopedFunc()
{
static bool this_variable_is_never_used = Init();
}
Show full article (0.79Kb)
2 Comments
  Re: A question about variable-argument lists         


Author: Dave Rahardja
Date: Dec 27, 2007 21:47

On 2007-12-27 23:19:07 -0600, red floyd said:
> A function foo is defined as:
> int foo(string, ...);
>
> How to determine there are how many arguments in the list?
>
> something in the first argument has to determine this.

Probably.

See the documentation for for details.

There is very little incentive to create new variable argument
functions in C++. Use function overloading or vectors instead.

-dr
no comments
  A question about variable-argument lists         


Author: red floyd
Date: Dec 27, 2007 21:19

A function foo is defined as:
int foo(string, ...);

How to determine there are how many arguments in the list?

something in the first argument has to determine this.
no comments
  Re: Help needed with "discards qualifiers" warning         


Author: Thelma Roslyn Lubkin
Date: Dec 27, 2007 20:46

:From Erik-wikstrom@telia.com Thu Dec 27 15:20:33 2007
:On 2007-12-27 21:14, Thelma Lubkin wrote:
:> matrixd.cc:244: warning: passing `const Octonion' as `this'
:> argument of
:> `Octonion Octonion::operator*(const
:> Octonion&) [with
:> scalar = double]' discards qualifiers
:>
:> I seem to get valid results if I ignore the warning, but I'd like to
:> understand what it means and to modify my classes so that it no longer
:> occurs.

:I am not quite sure (so I ought to not say anything) but have you
:declared the * operator as const? E.g.:
Show full article (0.98Kb)
1 Comment
  Cheap Fashion Shoes & Clothing & Mobile Phones & Handbags Wholesale on www.fashion-sky.com         


Author: fashion-sky.001
Date: Dec 27, 2007 20:20

Dear my friend
It is our pleasure to meet you here.
we are wholesaler sport shoes,clothing,electrons in Fujian of China.
our website: http://www.fashion-sky.com
We are professional and honest wholesaler of all kinds of brand
sneaks and apparel.the products
our company supply are as follows:
1).Nike Jordans
Jordan 1 jordan 1.5 jordan 2 jordan 3 jordan 3.5 jordan 4 jordan 5
jordan 5.5 jordan 6 jordan 6.5 jordan 7 jordan 8 jordan 9 jordan 9.5
jordan 10 jordan 11 jordan 12 jordan 13 jordan 13.5 jordan 14 jordan
15 jordan 16 jordan 17 jordan 18 jordan 18.5 jordan 19 jordan 20
jordan 21 jordan 21.5 jordan 22 jordan King jordan Dub Zero Jordan 23
Jordan 7.5
2).Air Force One Air Force one (low) Air Force one (High) Air Force
one (Mid) Air Force one (clear) Air Force One 25 year
3).SHOX Shox R3 Shox R4 Shox R5 Shox TL1 Shox TL2 Shox TL3 Shox NZ
Shox OZ Shox Turbo Show GO Shox CL Shox Coqnescenti Shox Energia Shox
Explodine Shox Monster Shox Rhythmic Shox Warrior
4).Bape Shoes Bape Bape (transparent) ...
Show full article (5.31Kb)
no comments
  A question about variable-argument lists         


Author: curiosity5374
Date: Dec 27, 2007 20:02

A function foo is defined as:
int foo(string, ...);

How to determine there are how many arguments in the list?
2 Comments
  Wireless connection issue         


Author: Luke
Date: Dec 27, 2007 19:46

I have recently set up a netgear wireless router into a modem and got
the wireless working fine on one Xp laptop only. When I try connecting
to the wireless from other laptops it doesn't work. I have tried
entering the WEP keys in again and it still doesn't work. Any ideas?
2 Comments
  install other STL (SGI STLport, etc) on Visual Studio 2008 (C++ 9.0)         


Author: Pedro Polonia
Date: Dec 27, 2007 19:10

Hello.

Does anyone install with success non microsoft STL on Visual Studio
2008? I have hash_set code that is not microsoft stl compatible, but i
can't put sgi or stlport to work...

Thanks in advance,

Pedro
no comments
  Check if virtual function has been overloaded         


Author: Mark
Date: Dec 27, 2007 17:53

Hi,

I have an abstract class which I want my other classes to inherit
from. In the constructor of the abstract class I want to check if
certain virtual functions have been overloaded or not. Is this
possible?

For example, let's say I have

class Base {
public:
virtual void display();
};

class Parent: public: Base {
public:
void display()
}

Then what I want to do is this:
Show full article (0.50Kb)
8 Comments
1 2 3