Up |
  |
Author: gp19823238gp19823238
Date: May 16, 2008 07:05
That's great, but do we really know what we do? Once someone found a
new type “diet” his is trying to use it for his business, but it is a
wrong approach. Your business is different, there are departments,
such as Sales, HR, Security, Financial. These departments function in
a different ways and if you will apply the same information diet to
all of them you will fail.
www.pengxq.cn
|
| |
|
| |
1 Comment |
|
  |
|
|
  |
Author: JavierJavier
Date: May 16, 2008 05:33
Hello,
I have some cuestions about constness with standard containers and
pointers.
Supose I have a list of pointers to some class B:
std::list< B * > > list;
I have readed that constness in std::list is the same that it is in C
arrays (const std::list makes const both the list and its content):
const std::list< B * > > constList;
I can't do:
constList->push_back(x);
But, is it still possible to call any non-const member funcion of B?:
void B::nonConstMemberFuncion();
As in:
constList.begin()->nonConstMemberFuncion();
a) It is possible. I don't want the user to add elements nor modify
any of the list. Which is the correct way of doing this?
const std::list< const B * const > > constList;
const std::list< const B * > constList;
|
| Show full article (1.38Kb) |
|
no comments
|
|
  |
Author: xtrigger303xtrigger303
Date: May 16, 2008 05:24
Hi to all,
I was reading Mr. Alexandrescu's mojo article and I've a hard time
understanding the following.
Let's suppose I have:
//code
struct A {};
struct B : A {};
struct C
{
operator A() const { return A(); }
operator B() { return B(); }
};
void F( A const & ) {}
void F( B const & ) {}
C const H() { return C(); }
|
| Show full article (1.58Kb) |
|
no comments
|
|
  |
|
|
  |
Author: AmyAmy
Date: May 16, 2008 03:15
Hi everybody,
Can anyone tell me how to compile a .cpp program to .dll using C++
builder or Delphi? The versions I am using is C++ builder 6 and Delphi
7. I am not a programmer but have to compile this cpp code into a dll
to proceed further. I am just concerned about the DLL file which I
have to use in a different software. Hence, my doubt may look very
silly but any help will be highly appreciated. I have been trying to
find this myself but couldn't do it.
A step by step procedure will be of great value.
Thanks
Ameya
|
| |
|
1 Comment |
|
  |
|
|
  |
Author: darrendarren
Date: May 16, 2008 00:30
Hi everybody
I am a bit confused about functions that take pointers / references as
parameters.
Are these two functions the same?
void myFunc(int& anInt);
void myFunct(int* anInt(0;
Would the difference be that, in the first function, i would us anInt
without dereferencing it, but in the second I would have to
dereference? Thanks for any clarification!
|
| |
|
6 Comments |
|
  |
Author: Juha NieminenJuha Nieminen
Date: May 16, 2008 00:04
Let's assume we have one .cc file which contains the following:
// ----------- file 1 -----------
#include
template
void foo(T t) { bar(t); }
void bar(int i) { std::cout << "int: " << i << std::endl; }
void anotherFunc();
int main() { foo(5); anotherFunc(); }
// ------------------------------
And another file which contains the following:
// ----------- file 2 -----------
#include
template
void foo(T t) { bar(t); }
void bar(long i) { std::cout << "long: " << i << std::endl; }
void anotherFunc() { foo(7); }
// ------------------------------
When I compile and run this, I get:
|
| Show full article (2.43Kb) |
|
11 Comments |
|
  |
|
  |
Author: comp.unix.shellcomp.unix.shell
Date: May 15, 2008 18:46
I'm trying to get the permutation of every element in a vector
I've looked at using and some of its examples, but the
examples I saw do all permutations of every item in t eh list. It
uses all elements in every permutation.
I've tried several attempts of recursion and some goto's withou
recursion.
The list length is 1..N
An example list (using chars for readibility
A B C D
I would be looking for
A
AB
ABC
ABCD
AC
ACD
AD
B
BC
BCD ...
|
| Show full article (0.47Kb) |
|
1 Comment |
|
|
|