On Monday, 3 November 2014 at 21:17:09 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
struct polynomial(uint base)
{
private:
uint[] N;
public:
this(uint x) { base = x; }
base is part of the type. polynomial is just a 'recipe' for a
type,
the real struct would be Polynomial!(0), Pol
On Mon, Nov 3, 2014 at 3:27 PM, Dominikus Dittes Scherkl via
Digitalmars-d-learn wrote:
> If I have a struct with numeric template parameter, how can I access it
> within member functions? Like normal member variables? And how about the
> constructor?
>
> struct polynomial(uint base)
> {
> private
On Monday, 3 November 2014 at 14:27:47 UTC, Dominikus Dittes
Scherkl wrote:
If I have a struct with numeric template parameter, how can I
access it within member functions? Like normal member
variables? And how about the constructor?
struct polynomial(uint base)
{
private:
uint[] N;
public:
If I have a struct with numeric template parameter, how can I
access it within member functions? Like normal member variables?
And how about the constructor?
struct polynomial(uint base)
{
private:
uint[] N;
public:
this(uint x) { base = x; }
...
void add(Polynomial!base P)
{