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
  Macro, Polymorphism         


Author: D. Susman
Date: Feb 17, 2008 23:13

Hi,

I wonder if there is a way to introduce polymorphic parameters to a
macro. What I'm trying to say is: Say, I have a macro X taking
argument of type A*. Let there be a B class deriving from class A. Can
I pass a B to the macro as a pointer to A?

(One might say, "use templates anyway". I am applying a memory pool
mechanism and wrapping new and delete with macros New and Delete
correspondingly)

Thanks.
2 Comments
  changing registry permission programmatically         


Author: Samant.Trupti
Date: Feb 17, 2008 22:44

Has any one know how can I change registry permission
programmatically. I tried regini.exe bit it is changing permission
for that particular folder or key. I want to apply that permission
change for complete tree.
1 Comment
  writing an external function in std c++         


Author: Gerry Ford
Date: Feb 17, 2008 21:41

I've been pecking away at writing a program that will calculate the inner
product of two double-width four-vectors.

Larry thinks I'm well started with the following source to populate a
vector:
#include
#include
#include
#include
#include

int main() {
std::vector four_vector;

for (double i=0.0; i<4.0; i++)
four_vector.push_back(sqrt(i));

std::cout.precision(16);

std::copy(four_vector.begin(), four_vector.end(),
std::ostream_iterator(std::cout, "\n"));
return 0;
}
Show full article (1.50Kb)
22 Comments
  help me in vc++         


Author: mathudiv
Date: Feb 17, 2008 21:34

hi,
i want to call main( ) in one program as a fuction from some other
main().
now i am working in vc++ 2008..
i need all ur suggestion to complete my project
7 Comments
  C++ declarations (arrays and pointers)         


Author: joeschmoe98
Date: Feb 17, 2008 16:21

i know that:

double *a[n]; is an array of n pointers

double (*b)[n]; is pointer to array of size n

but what is:

double ( *c[n] )( ); and

double ( *d( ) )[n];
7 Comments
  template friend class         


Author: Kira Yamato
Date: Feb 17, 2008 13:28

A question about declaring a friend class. The following does not compile:

template
class B
{
public:

friend class C;
};

g++4.0.1 returns the error message

error: using template type parameter 'C' after 'class'

So, is there a way to declare a friend class from the template parameter?

--

// kira
12 Comments
  member accessor template         


Author: Kira Yamato
Date: Feb 17, 2008 12:00

Ok, I'm trying to do something funky here, just to see how much the C++
syntax can be stretched. Here's the problem I was trying to solve.

Suppose you have the following common situation of a class A with two
accessor methods for x:

class A
{
public:
int get_x() const;
void set_x(int);
};

Normally, we would have the following syntax:

// (1)
A a;
a.set_x(3);
int y = a.get_x();

However, let's say I want to implement the following syntax instead
Show full article (1.77Kb)
2 Comments
  copy data on screen         


Author: Rajtomar
Date: Feb 17, 2008 11:18

i have small gaem which pick a word randomly from a list of 100 four
letterd words and asks user to guess it, when user inputs it, program
compares the inputted word with the randomly picked word and return
results, user gets 10 chances to guess the correct word. famous "COWS
n BULLS" now the problem is that program has 4 options ,start ,
resume, help screen and exit. now if a user wants to see help screen
in between the game , the current game will be lost and a new game
will start on selecting start.

i want that if a user selects help screen in between a running game
then the screen should be copied and should be printed on rselection
of resume.

any ideas ???????
1 Comment
  copy data on screen         


Author: Rajtomar
Date: Feb 17, 2008 11:18

i have small gaem which pick a word randomly from a list of 100 four
letterd words and asks user to guess it, when user inputs it, program
compares the inputted word with the randomly picked word and return
results, user gets 10 chances to guess the correct word. famous "COWS
n BULLS" now the problem is that program has 4 options ,start ,
resume, help screen and exit. now if a user wants to see help screen
in between the game , the current game will be lost and a new game
will start on selecting start.

i want that if a user selects help screen in between a running game
then the screen should be copied and should be printed on rselection
of resume.

any ideas ???????
1 Comment
  new member         


Author: mr.bhoot.ji
Date: Feb 17, 2008 03:28

hi i am new member of this group.
no comments
1 2