Search:

Type: Posts; User: nepper271

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Since I know that xcx[i] + dx[i] < bux[i], I...

    Since I know that xcx[i] + dx[i] < bux[i], I decided to make small values of dx to be equal to zero. Thank you for the replies.
  2. Thanks for the quick reply. But shouldn't gdb...

    Thanks for the quick reply.

    But shouldn't gdb round it up too? Also, when I manually set the number to the sum using gdb, it works. And the rest of the program runs normally.


    (gdb) print...
  3. The sum that does not equals the sum. gdb involved.

    Hello everyone,

    I'm having a very strange problem with my code. In an assignment, the right hand is a sum, that I verify using gdb. The left side does not take that value. Instead, it takes the...
  4. Replies
    2
    Views
    2,827

    Never mind this post. It is working now. Sorry...

    Never mind this post. It is working now.

    Sorry for the inconvenience
  5. Replies
    2
    Views
    2,827

    typedef long int comparison

    Hello,

    I have a library which typedefs a long int



    //from tpd1.h

    typedef long int Int
  6. Replies
    4
    Views
    993

    foo is not my function, is part of a C library.

    foo is not my function, is part of a C library.
  7. Replies
    4
    Views
    993

    non-const argument and const pointer

    Hello all,

    I have a C function

    void foo (double * x, size_t s);
    where x is a vector and which I know that doesn't modify x.

    And I have a pointer
  8. Replies
    4
    Views
    2,254

    I normally separate the executable from the rest,...

    I normally separate the executable from the rest, and with the rest I call a library. However, in my line of work, I make libraries that other people will use (hopefully). What this mean is that I...
  9. Replies
    10
    Views
    2,772

    I'm not familiar with static_assert, so I went to...

    I'm not familiar with static_assert, so I went to make some tests. I tried this code:




    #include <iostream>

    using namespace std;

    template < typename T > void function_create (T& a) {
  10. Replies
    10
    Views
    2,772

    Like I said first : "I'm using a library in C for...

    Like I said first : "I'm using a library in C for my project". It's not my library. function_int_start and function_long_start are already created. I need to use them.
  11. Replies
    10
    Views
    2,772

    Actually, the C library is compiled with both...

    Actually, the C library is compiled with both definitions, and each with a different name. The functions in the C library are defined so that every difference from a long to a int is resolved with a...
  12. Replies
    10
    Views
    2,772

    Yes, the implementation is the same very much...

    Yes, the implementation is the same very much like a template, changing only the type. The problem with using template is that I can't figure out how to change the function name in the call. E.g.:
    ...
  13. Replies
    10
    Views
    2,772

    Substitution from C to C++

    Hello all,

    I'm using a library in C for my project. This library defines two functions for everything it does, one for int and other for long int. To use the long version, you must define...
  14. Replies
    7
    Views
    3,971

    Hello all, I found the problem. My linking was...

    Hello all,

    I found the problem. My linking was done wrong, because of inverted order of inclusion of libraries. I didn't know that the compiler (g++) reads it from the right to the left.

    Thank...
  15. Replies
    7
    Views
    3,971

    Still no solution found, nobody can help with...

    Still no solution found, nobody can help with this?
  16. Replies
    7
    Views
    3,971

    I've just made the following modification to...

    I've just made the following modification to short3.cpp:



    //short3.cpp modified
    #include "base_matrices.h"

    using namespace base_matrices;

    int main (void) {
  17. Replies
    7
    Views
    3,971

    Okay. First of all, sorry for the big post. ...

    Okay.

    First of all, sorry for the big post.

    I'm trying to work with CHOLMOD. There is a huge number of functions and definitions here, but all I need to include is cholmod.h, which have extern...
  18. Replies
    7
    Views
    3,971

    The final executable. If I try to include the...

    The final executable. If I try to include the libraries before, the compiler says they where not used.
  19. Replies
    7
    Views
    3,971

    Using C in C++

    Hello all,

    I'm using some libraries made in C, in my C++ program. I must design a library that will basically encapsulate this C library. There is a test1.c example of the use of the library. I...
  20. Replies
    6
    Views
    1,541

    Try something like X = 0 while (X != 7) { ...

    Try something like


    X = 0
    while (X != 7) {
    X = call_menu()
    }

    i.e. put everything inside a while whose stopping condition is the quit entry.
  21. Replies
    6
    Views
    1,541

    The correct syntax is if (exp) { } else...

    The correct syntax is


    if (exp) {

    } else if (exp2) {

    }

    You are doing
  22. Replies
    2
    Views
    1,543

    Thank you cas, you are right. I have changed...

    Thank you cas, you are right.

    I have changed maxG to 50 and it worked properly.

    Thanks a lot for the reply,
    Abel
  23. Replies
    2
    Views
    1,543

    structs created in same address?

    Hello,

    I have the following simple program



    #include <stdio.h>
    #include <math.h>
    #define maxG 500
  24. Replies
    1
    Views
    4,253

    Thank you for the effort, and sorry to waste your...

    Thank you for the effort, and sorry to waste your time. I found what happened (though I haven't found where it happen yet).

    The vector vCOMP was pointing to right before where S where pointing to....
  25. Replies
    1
    Views
    4,253

    Pointer becomes NULL inside loop

    Hi all,

    I'm having a problem with a pointer struct to pointer passed in a function...
    We'll, better show first.



    void defCompraBuscaLocal ( int * vCOMP, Instancia * I, Solucao * S,...
Results 1 to 25 of 50
Page 1 of 2 1 2