comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
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
  Can this be done with templates?         


Author: sip.address
Date: Feb 29, 2008 16:51

Hi, I'm newbie with c++ templates and was wondering if this is
achievable.
Consider these classes:

class B {};
class D1 : public B {};
class D2 : public B {};
class D11 : public D1 {};
..etc

Class B will define a couple of simple methods that will be shared (no
need to override them) with its derived classes. With more detail,
class B could be:

class B {
public:
B(const std::string& id) : id_(id) {}
private:
std::string id_;
};

The question is, is there an easy way to generate this tree? I'd like
something like:
Show full article (0.65Kb)
7 Comments
  Some simple questions         


Author: Ioannis Vranos
Date: Feb 29, 2008 09:24

1. 1U means that 1 is an unsigned int and not another unsigned type?

2. '\012' and '\xb' values are the same with 012 and 0xb?

3. Any numbers appearing like the following:

'\546'

are considered octals or decimals?
13 Comments
  C++ and moving the mouse...         


Author: Narcolessico
Date: Feb 29, 2008 08:19

Hi,
I'm writing on Linux an application which needs to move the mouse pointer
and simulate button clicks (better: button press and release events
separately, e.g. to do drag&drop).
I found several ways to move the pointer:
- Using QT QCursor::setPos
- Using SDL libraries
...
- Using XLib directly

Now the problem is... I can move it, but I can't really simulate clicks.
On Qt, I don't know to who I should send the mouse motion event ( I tried to
send it to the application itself, but it doesn't work), because I don't
have any interface (it is a command line app).

With Xlib, I can move the cursor with XWarpPointer, but it seems to reset
the button state. I send a button press event with the code I found here:

http://snippets.dzone.com/posts/show/2750

but as soon as I call XWarpPointer, the button status is reset and the click
results in only a point. If a drawing application has the focus, I would
draw on it; unfortunately, I only see points.
Show full article (1.39Kb)
1 Comment
  Want to play online game???         


Author: kaki
Date: Feb 29, 2008 06:59

no comments
  template constructor         


Author: Christof Warlich
Date: Feb 29, 2008 04:22

Hi,

is there any way to instantiate class A through
this constructor? I'd like to pass the value as
a template parameter instead of a constructor
argument for performance reasons. It will be part
of a very performance-critical library and the
parameter will always be known at compile time.

Thanks for any help,

Christof

#include
class A {
public:
template A(void) {
std::cout << x << std::endl;
}
};
int main(void) {
// A a<27>; // does not work
}
11 Comments
  ANN: Call for Participation - Code Generation 2008         


Author: Mark Dalgarno
Date: Feb 29, 2008 03:56

With an emphasis on providing practical advice, Code Generation 2008
is the ideal opportunity for architects, developers and others to
understand how to benefit from emerging tools and technologies in the
broad area of Code Generation.

Call for Participation:

The full programme for June's CG2008 event is now available. 34
sessions will be presented by 30 industry veterans with a backgroound
of successful project delivery.

Highlights include:

Steve Cook (Microsoft) - The Domain-Specific IDE
Bran Selic (Malina Software Corp.) - Code generation in Quality-of-
Service constrained applications

- Jason Bernier on 'Evangelizing Code Generation: A Case Study of
Incremental Adoption'

- Arno Haase and Sven Efftinge on 'An overview of Eclipse Modelling'

- Juha-Pekka Tolvanen on 'Best practices for Creating Domain-Specific
Languages'

- Markus Völter on 'Building Interpreters with EMF, Xtext and Scala'
Show full article (1.63Kb)
32 Comments
  cleanup of temporary objects         


Author: yevvio
Date: Feb 29, 2008 02:58

Hi, sorry, messed up my previous post...

Consider the following code:

class A {
int x;
public:
A() { printf("In A()\n"); x = 5; }
~A() { printf("In ~A()\n"); }
operator int *() { printf("In int *()\n"); return &x; }
};

A f1()
{
printf("in f1()\n");
return A();
}

void foo(int *p) { printf("in foo()\n"); }
Show full article (1.19Kb)
11 Comments
  Earn by doing simple Computer Jobs. No Selling Required.         


Author: wantonlinemoney
Date: Feb 29, 2008 02:24

Earn by doing simple Computer Jobs. No Selling Required.
no Going out of Home. No Office. No Boss. Not a 9 to 5 job.
No experience required. Simple Jobs. Basic knowledge of Computers
and Internet is enough. Suitable for housewives, students,
workers, retired persons and youths.
For further details please visit:

http://makingmoney71.googlepages.com
no comments
  windows c-runtime library         


Author: Lutz Altmann
Date: Feb 29, 2008 02:22

Hi there,

i've a question related to the usage of the win32 c-runtime libraries:

I have a dynamic library - this one is linked to the static
multithreaded runtime lib (non debug . \MT)

Now my question is :
When i use this DLL from another program - can there arise problems
when this program itself uses a different version of the c-runtime
lib - or is it uncritical?

Thanks in advance,
Lutz
4 Comments
  tracing c++ functions         


Author: Lutz Altmann
Date: Feb 29, 2008 02:14

Hi,

i'm searching a handy way to trace my c++ programms - so that i can
visually reproduce the
function call sequence.
Can anyone recommend a tracing-tool/method ?

Greetings,
Lutz
8 Comments
 
1 2 3 4 5 6 7 8 9