Search:

Type: Posts; User: sjweinberg

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,023

    c++ headers and classes

    So suppose I have a big C++ program with a class called Hello.

    Suppose furthermore that Hello has 3 methods foo(), bar(), asdf().

    Now, my question what the usual way to store the classes is....
  2. Replies
    12
    Views
    1,136

    I don't think this quite solves my problem, but...

    I don't think this quite solves my problem, but that's because I was a little unclear (sorry).

    What I really want to do is write this out, and then be able to read it back in in the same format. ...
  3. Replies
    12
    Views
    1,136

    Writing classes of dynamic size

    Hello.
    So first of all, I'm used to C, but not C++, so I probably need a little bit more explanation than is normal.

    Here is my question:
    Suppose I have a class like this



    class Hello
    {
  4. Replies
    16
    Views
    24,455

    OKAY! Sorry everyone. Turned out I had some...

    OKAY!
    Sorry everyone. Turned out I had some funky stuff in my Makefile. It was stuff that other people in this lab made, and I didnt know enough about Makefiles to know that it was causing a...
  5. Replies
    16
    Views
    24,455

    getip is defined in a file called...

    getip is defined in a file called test_support.cpp.

    Here is that file:

    #include<stdio.h>
    #include<stdlib.h>

    #include <iostream>
    #include <fstream>
    #include <fcntl.h>
  6. Replies
    16
    Views
    24,455

    Sure! Here is the code with the comments taken...

    Sure! Here is the code with the comments taken out:



    #ifndef TEST_SUPPORT_H
    #define TEST_SUPPORT_H

    #ifndef ON
    #define ON 0
    #endif
  7. Replies
    16
    Views
    24,455

    Yeah, I'd like to avoid posting the entire...

    Yeah, I'd like to avoid posting the entire program if possible. It's actually quite long, even if I cut out a lot to simplify. There are no global variables so that isn't the problem.

    Here is an...
  8. Replies
    16
    Views
    24,455

    Well I have things like #define ON 1 is that...

    Well I have things like
    #define ON 1
    is that what you mean by a global variable?

    I also tried to recreate the error with some smaller code but couldn't. I'm really getting confused because I...
  9. Replies
    16
    Views
    24,455

    By inline, do you mean in the source code files? ...

    By inline, do you mean in the source code files? As in, did I put say
    void goodfunc(void);
    in the header but never mentioned it anywhere else?
  10. Replies
    16
    Views
    24,455

    Unfortunately, I already put those in... I'll...

    Unfortunately, I already put those in...
    I'll check to make sure I did it right, but I dont think that's the problem.
  11. Replies
    16
    Views
    24,455

    Header files and multiple definitions

    Hello!

    So I am working on a rather large program using many .cpp files and ,h files and compiling them all together wit a Makefile.

    I'm not the only one working on this project, and my part of...
  12. Replies
    3
    Views
    994

    fwrite weird problem

    Hello

    I am trying to output to a file the binary form of some unsigned integers. More specifically, I only want the first two bytes from those integers.

    In the following code, inp is a pointer...
Results 1 to 12 of 13