Search:

Type: Posts; User: qxcdfg

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,455

    Sometimes I'm amazed at how much I completely...

    Sometimes I'm amazed at how much I completely miss when I check my code...

    Thanks!
  2. Replies
    2
    Views
    1,455

    Using cin with a custom type

    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...
  3. Replies
    2
    Views
    972

    Thanks!

    Thanks!
  4. Replies
    2
    Views
    972

    Passing filename as a string

    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...
  5. Replies
    2
    Views
    1,150

    I actually figured this out just now... ...

    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.
  6. Replies
    2
    Views
    1,150

    Class interdependency circle

    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,...
  7. Replies
    11
    Views
    1,897

    Thanks :) I've even got it working with...

    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"...
  8. Replies
    11
    Views
    1,897

    Hi, me again. Is there any way to change this...

    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++)
  9. Replies
    11
    Views
    1,897

    Yay! It works! Okay, vectors sound important....

    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...
  10. Replies
    11
    Views
    1,897

    I do not have a copy constructor. The reason that...

    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...
  11. Replies
    11
    Views
    1,897

    Right, that makes sense. But then, why does...

    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...
  12. Replies
    11
    Views
    1,897

    Stack corruption by class destructor

    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...
Results 1 to 12 of 12