Search:

Type: Posts; User: eccles

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    10,211

    thanks quzah :) Yeah I was worried about that......

    thanks quzah :)
    Yeah I was worried about that... I had even tried casting NULL to electron but of course it didn't let me do that - but I had considered that even if it did it would still evaluate...
  2. Replies
    6
    Views
    10,211

    null struct to terminate array of structs?

    Hi there,
    I'm sorry if this has already been discussed ad nauseum, but a quick search I did turned up 500 results and none of them seemed to be what I wanted ( imagine searching for 'null struct'...
  3. Replies
    7
    Views
    2,470

    ok this is *very* scary. with -O3: =...

    ok this is *very* scary.

    with -O3:
    <Eloc> = -7.478(5)
    t = 114s

    with -O2:
    <Eloc> = -7.478(5)
    t = 113.8s
  4. Replies
    7
    Views
    2,470

    thanks for telling me that! C++ has suddenly...

    thanks for telling me that!
    C++ has suddenly lost a lot of its appeal (for this task anyway).

    Odd thing is, I tried compiling with -O2 instead of -O3 and I got a 'variable might be used...
  5. Replies
    2
    Views
    23,644

    Hi Salem! thank you *so* much for your helpful...

    Hi Salem!
    thank you *so* much for your helpful and constructive comments.
    There's no real reason for me to keep the profiling options in the makefile by default, since the number of times I have...
  6. Replies
    7
    Views
    2,470

    Tips for converting C prog. to C++?

    Hi there,
    I am keen to get my C program to compile under C++ because then I can experiment with using some C++ features to optimise the code (and yes unfortunately I do need to optimise, it's a...
  7. Replies
    2
    Views
    23,644

    g++ error: Macro names must be identifiers.

    Hi there,
    I am trying to compile a C program that I am working on into C++...

    the compiler version I am using is:


    gcc version 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
  8. yay! I can't get over how elegant this solution...

    yay! I can't get over how elegant this solution is. I love it. thank you all so much once more :D
  9. aaahhh wait a sec - now I get what you mean......

    aaahhh wait a sec - now I get what you mean...
    hehe I had been trying to put an include statement in the ifndef...

    cool! so once it's loaded once, any further attempts will do nothing. brilliant...
  10. does that pragma statement only apply to the line...

    does that pragma statement only apply to the line directly beneath it?
  11. oh! I actually tried that but it didn't seem to...

    oh! I actually tried that but it didn't seem to help - I got the exact same error message :confused:

    Perhaps I did it wrong somehow...

    cheers for the help :D
  12. Tell gcc to not include a header more than once?

    Hi there,
    here's a really quick question:

    say I have some files:

    linalg.h


    typedef struct {
    ...
  13. Replies
    17
    Views
    14,842

    thanks for mentioning that :) I think I read...

    thanks for mentioning that :)
    I think I read that function variables are stored on the heap and globals on the stack - is that what you are referring to?

    the annoying thing RE time spent calling...
  14. Replies
    17
    Views
    14,842

    thanks so much for all your helpful comments and...

    thanks so much for all your helpful comments and examples (and that excellent link!) and in particular the warnings about macros. I should probably stay away from them at this stage... I am going to...
  15. Replies
    17
    Views
    14,842

    function-call overhead... real? or not?

    hi there,
    this is a subject that i know almost nothing about and I was hoping to gain enlightenment from some of you who are far more versed in the ways of C.

    I have read references to...
  16. so do you have any thoughts then on the relative...

    so do you have any thoughts then on the relative virtues of C/C++ in scientific computing applications?
  17. Replies
    5
    Views
    1,276

    Prelude: RE your signature... I just compiled...

    Prelude:

    RE your signature... I just compiled it and got a Bus error... is that the intended outcome?
  18. well that sounds rather appealing... then...

    well that sounds rather appealing...

    then perhaps I should look into that way of doing it... or perhaps I am looking to hard to save myself 2 extra lines of code that overall probably keep things...
  19. ahh cheers, that makes perfect sense. so there...

    ahh cheers, that makes perfect sense.

    so there is no way to fiddle with this to make it work?:



    typedef struct {
    double energy1;
    double energy2;
    void...
  20. ahh fair enough (re the commenting out of...

    ahh fair enough (re the commenting out of constpart * electrons)
    I have only found this board in the last few days (mainly because I have only been learning C the last few days/week) - so just as an...
  21. out of interest Dave, why did you comment out...

    out of interest Dave, why did you comment out 'constpart * electrons' ?
    it's just a pointer to an array of constpart structs...

    something like:


    typedef struct {
    evector r; //...
  22. ok in that case my next question must be (and as...

    ok in that case my next question must be (and as you may have gathered from some of the variable names that this is a scientific computing application, and one that does not scale well with system...
  23. ooh thankyou :) I didn't expect a reply this...

    ooh thankyou :) I didn't expect a reply this fast!

    to turn your example around a bit, would this be possible?:


    typedef struct tag_diffuser
    {
    //constpart * electrons;
    double energy;
    ...
  24. well of course I could do that... but... I had...

    well of course I could do that... but... I had hoped that there might be a way to package the function up into the struct as part of its definition, so it could be called like:


    diffuser walker;...
  25. Possible to create methods for data in structs?

    Hi there,
    I am rather new to C, and I am having a bit of trouble finding information on this thing that I want to do (damn google is good - but it's a shame that the creator of C didn't know about...
Results 1 to 25 of 36
Page 1 of 2 1 2