Search:

Type: Posts; User: Nextstopearth

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    1,994

    Ahh, I get it now, thanks.

    Ahh, I get it now, thanks.
  2. Replies
    19
    Views
    1,994

    For that last function declaration, my reasoning...

    For that last function declaration, my reasoning would be that, if a double * was passed to it,

    T **************************************** arg would now actually be
    double *...
  3. Replies
    19
    Views
    1,994

    Well apparently there are things going on here...

    Well apparently there are things going on here that I am not aware of. For example:


    template <typename T>
    void func(T arg);

    If you call func with

    func(3);
  4. Replies
    19
    Views
    1,994

    Type *

    Type *
  5. Replies
    19
    Views
    1,994

    That doesn't help me...I know Type is supposed to...

    That doesn't help me...I know Type is supposed to be double. I just don't see why. Again, if you are sending a double * as an argument, and then declaring a pointer to that, how is A not a pointer to...
  6. Replies
    19
    Views
    1,994

    I am confused then. If Type is double *, and we...

    I am confused then. If Type is double *, and we have Type *A, it seems like A would be a double **.
  7. Replies
    19
    Views
    1,994

    Since array is double * in both cases, how does...

    Since array is double * in both cases, how does Type end up being double in version 2?
  8. Thank you. Elysia, what else needs to be done...

    Thank you. Elysia, what else needs to be done than just implement operator<<()?

    Edit:
    I think I know what you mean now. myobj is a std::vector. I realize now that that makes my code example a...
  9. Objects with ostream_iterator and copy()

    if I want to do this


    std::copy(myobj.begin(),myobj.end(),std::ostream_iterator<myobjtype>(std::cout, "\n");

    What method do I have to overload in myobjtype to get this to work? Is it...
  10. Replies
    4
    Views
    991

    Thank you.

    Thank you.
  11. Replies
    4
    Views
    991

    Hmm I see, thanks. I thought the #ifndef...

    Hmm I see, thanks. I thought the #ifndef directive would have kept it from being defined more than once for the whole program. So things defined with #define are only visible to the file they are in...
  12. Replies
    4
    Views
    991

    Build error

    Multiple definitions of "board". Here are my files.
    main.cpp


    #include <stdlib.h>
    #include "global_functions.h"

    int main(int argc, char** argv) {
    initialize_game();
    return...
  13. Replies
    2
    Views
    1,527

    Oh I see. Thanks

    Oh I see. Thanks
  14. Replies
    2
    Views
    1,527

    Functions of arbitrary parameters

    While browsing a c++ faq I came across this comparison with C and found something I either didn't know or am reading wrong.


    [6.11] Is C++ backward compatible with ANSI/ISO C?

    Almost.

    C++...
  15. Replies
    10
    Views
    1,786

    I changed incat() so that it returns char * so I...

    I changed incat() so that it returns char * so I can do something like


    str = incat(str);


    That works fine if str was initialized by instring(), but something like


    char * str = "Hello";
  16. Replies
    10
    Views
    1,786

    Ahh, thats right, I get it now. Thanks.

    Ahh, thats right, I get it now. Thanks.
  17. Replies
    10
    Views
    1,786

    After I posted the code I saw that a bunch of...

    After I posted the code I saw that a bunch of extra space was added so I edited it out, but I must have accidentally gotten a semicolon.

    zacs7- thanks for the tips. I realize the pointer returned...
  18. Replies
    10
    Views
    1,786

    Help - String input header

    What I want to do is to get a string from input without having to guess at the size of the array needed beforehand, and be able to concatenate a new input string on the end of it, something like...
  19. Replies
    2
    Views
    3,984

    Help Debugging my AVL tree program.

    I almost feel bad posting such a horrible looking and long piece of code, but IF anybody feels like flexing their programming muscles a little and helping me out, I would really appreciate it. This...
  20. Replies
    9
    Views
    1,813

    Getting a Segmentation fault

    This is the beginning of an avl tree project. I've never heard of a segmentation fault before now, but after some reading I guess is has something to do with read/writing is a specific point in...
  21. Thread: c99

    by Nextstopearth
    Replies
    8
    Views
    2,486

    c99

    c99 doesn't seem like it has been much of a priority as a standard to implement since it was published, am I right? GCC implements some but not all of it, VC++ doesn't support it (I don't think), and...
  22. Replies
    5
    Views
    1,730

    Ya I considered passing the size but I was hoping...

    Ya I considered passing the size but I was hoping I could get around it to keep the parameter list down. Oh well thanks for the info.

    Ronix, I read about macros like that before but I can't tell...
  23. Replies
    5
    Views
    1,730

    sizeof(arrays)

    My main goal is to find out the number of elements in an array. In my program I have something like this:


    int arr1[] = {3,4,6,7};

    printf("The array has %d elements.\n",...
  24. Replies
    6
    Views
    5,334

    I was really just looking for an example of how...

    I was really just looking for an example of how something like this might work. The first time I tried the previous example I got an error an thought I must have been way off base, but it magically...
  25. Replies
    6
    Views
    5,334

    char* version = (char*) glGetString(GL_VERSION);...

    char* version = (char*) glGetString(GL_VERSION);
    messagebox(hWnd, version, "title bar", MB_OK );
Results 1 to 25 of 55
Page 1 of 3 1 2 3