|
-
Jul 4th, 2001, 01:18 PM
#1
I hate classes!
Code:
typedef unsigned long integer ULI;
class SecureHA
{
private:
ULI H[5]={23,54,27,45,64}; //ERROR HERE!
...
...
...
}:
The compiler will not let me initialise this array within the class definition, any ideas why?
-
Jul 4th, 2001, 01:51 PM
#2
Guru
You cannot initialize data members like this. It must be in the constructor.
Code:
class c
{
private:
int h[5];
public:
c()
{
h[0] = 23;
h[1] = 54;
h[2] = 27;
h[3] = 45;
h[4] = 64;
}
};
Enjoy
-
Jul 11th, 2001, 01:18 PM
#3
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!
-
Jul 11th, 2001, 01:45 PM
#4
How are you going to store the information in the unsigned long integers? Is it going to be the ASCII value?
-
Jul 12th, 2001, 02:58 AM
#5
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|