I
Iguana
Say you've got this class....
<template TYPE>
class CNode {
TYPE data;
};
How would you initialise 'data'? I have to admitt I've not been programming
as much as I did when I was younger, looking at the MFC class 'CLink' it
appears to be possible, although the CList class is template and contains
the class CNode that isn't template.
I stupidly started with operator= before I remembered it wasn't defined yet,
then thought about using pointers to copy the data, but sizeof TYPE and
sizeof(TYPE) don't seem to be able to be evaluated.
Thanks in advance,
Iguana
<template TYPE>
class CNode {
TYPE data;
};
How would you initialise 'data'? I have to admitt I've not been programming
as much as I did when I was younger, looking at the MFC class 'CLink' it
appears to be possible, although the CList class is template and contains
the class CNode that isn't template.
I stupidly started with operator= before I remembered it wasn't defined yet,
then thought about using pointers to copy the data, but sizeof TYPE and
sizeof(TYPE) don't seem to be able to be evaluated.
Thanks in advance,
Iguana