Hi, I'd like declare float spec[4]; as private member of a class; my problem is that I need do something about this (declare and initialize but inside declare of class seems not possible):
float spec[]={.4f,.4f,.4f,1};
float spec[]={.4f,.4f,.4f,1};
To copy to clipboard, switch view to plain text mode
I tried declare
class myClass {
float spec[4];
};
myClass::myClass() {
spec[]={.4f,.4f,.4f,1};
}
class myClass {
float spec[4];
};
myClass::myClass() {
spec[]={.4f,.4f,.4f,1};
}
To copy to clipboard, switch view to plain text mode
but this get an error;
Do I make a for cicle to initialize spec???? Thanks
Bookmarks