Search:

Type: Posts; User: melkor445

Search: Search took 0.00 seconds.

  1. Replies
    16
    Views
    2,960

    I just tried with g++ and it did not produce any...

    I just tried with g++ and it did not produce any error:



    $ g++ --version
    i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
    $ g++ -Wall main.c
    $ ./a.out
  2. Replies
    16
    Views
    2,960

    This is just to demonstrate what I mean, but in...

    This is just to demonstrate what I mean, but in practice I will be writing a program that is very large in which I might accidently call functions with the wrong type of arguments, so need a way to...
  3. Replies
    16
    Views
    2,960

    Checking function arguments

    Hi,

    I am new to programming in C, but (as a scientist) have a lot of programming experience in Fortran 95.

    I am trying to figure out how to get the compiler to raise an error if a function is...
  4. Ok, I think I see what you mean. Thinking about...

    Ok, I think I see what you mean. Thinking about it I don't have a good reason for the arrays to be globally available. And I can easily know the size of the array I will require before the first...
  5. For the purposes of my program, I require several...

    For the purposes of my program, I require several 3D (and 6D) arrays to be globally accessible from a specific class, but I don't know what it's dimensions are until runtime. Once allocated I don't...
  6. Speed is an issue, but I would not sacrifice code...

    Speed is an issue, but I would not sacrifice code simplicity for only say a factor of 2 or less improvement. And this method does seem pretty simple code-wise.

    From what I've read about vectors,...
  7. Ok, thanks! So say that we didn't care about...

    Ok, thanks!

    So say that we didn't care about code aesthetics (although I do in reality!), and wrote this using vectors of vectors of vectors etc. as you suggested, what kind of speed gain are we...
  8. not forgetting semicolons in the above of...

    not forgetting semicolons in the above of course...
  9. Thanks for your comments! I decided not to put...

    Thanks for your comments!

    I decided not to put the allocation inside the constructor, because I want to allocate the array separately from declaring it.

    Regarding the destructor, I am wandering...
  10. Multi-dimensional dynamic array - performance

    Hi everyone,

    I am currently learning c++ (but having programmed in fortran 95 before, it is mostly a case of learning new syntax, and a few new concepts, in order to be familiar with the basics)....
Results 1 to 10 of 10