Sometimes I'm amazed at how much I completely miss when I check my code...
Thanks!
Type: Posts; User: qxcdfg
Sometimes I'm amazed at how much I completely miss when I check my code...
Thanks!
Yeah, me yet again. I tried to avoid bugging you guys, but I've hit a problem that's so puzzlingly nonsensical that I can't even begin to figure out what's going on.
Here's the relevant parts of...
Thanks!
Hi, me again!
I have this code:
char* getfilebits(char* filename)
{
char* ptr;
ifstream file (filename, ios::in|ios::binary); // open file for reading
if (file.is_open()) // did it...
I actually figured this out just now...
putting
class <classname>;
at the top of the file, works like the prototype functions in the classes. Fixes my interdependency issues.
I've got two classes: matrix, and ffbyte. They both work fine, and ffbyte is loaded as a header in matrix, which is a header in main.
The elements in the matrices are ffbytes. This works fine,...
Thanks :)
I've even got it working with vectors now. I've been able to cut out a few conditionals due to the exception throwing. Now, maybe I should try making an "invalid matrix operation"...
Hi, me again. Is there any way to change this code:
ostream& operator << (ostream& os, const matrix& m)
{
int r,c;
ostream out;
for(r=0; r<m.rows_; r++)
{
for(c=0; c<m.cols_; c++)
Yay! It works!
Okay, vectors sound important. I'll learn them, seeing as I'm making matrices with a view to implementing AES (I like to jump in head first, and explore).
I actually had a copy...
I do not have a copy constructor. The reason that I'm not using vectors is because (a) I don't know what they are, (b) I've been told this is the most efficient solution.
Right, off to write a...
Right, that makes sense. But then, why does delete [] cause a violation? It works fine when matrices are deleted at the end of main{}. I can't see why it would cause a violation just because it's...
I've defined a matrix class in C++, with a single data_[] array, and an overloaded () operator to access it. It worked fine as a container, but I defined an addition operation:
matrix...