The compiler will not let me initialise this array within the class definition, any ideas why?Code:typedef unsigned long integer ULI;
class SecureHA
{
private:
ULI H[5]={23,54,27,45,64}; //ERROR HERE!
...
...
...
}:
Printable View
The compiler will not let me initialise this array within the class definition, any ideas why?Code:typedef unsigned long integer ULI;
class SecureHA
{
private:
ULI H[5]={23,54,27,45,64}; //ERROR HERE!
...
...
...
}:
You cannot initialize data members like this. It must be in the constructor.
Enjoy :rolleyes:Code:class c
{
private:
int h[5];
public:
c()
{
h[0] = 23;
h[1] = 54;
h[2] = 27;
h[3] = 45;
h[4] = 64;
}
};
Cool thanks.
Hmm, I don't suppose you know how to read a file into an array of unsigned long integers do you?
The array size is a multiple of 512 bytes. But the file is probably a bit less than that (but the array will always be big enough to hold the file).
Its a weird request from a C++ newbiw like me, but I gotta start somewhere!
:)
How are you going to store the information in the unsigned long integers? Is it going to be the ASCII value?
Once its in the array and has been processed, it will be in a completely incoherent form. Except no-one knows how to get it in there!