Search:

Type: Posts; User: panos

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    8,180

    nice fractions? the only thing i want to...

    nice fractions?


    the only thing i want to assume is float range and positive values...
  2. Replies
    4
    Views
    8,180

    float multiplication and subtraction

    i know this has been mentioned over and over (and over) again in this forum but i would like to ask specifically on a function i've been playing around:



    #include <stdio.h>
    #include <stdlib.h>...
  3. Replies
    6
    Views
    29,104

    By the time i was in the middle of trying post...

    By the time i was in the middle of trying post #4, i "copy paste" #6 and worked just fine. my deep thanks to all of you guys, you're great.

    ps. i just found #6 initialization in "pointers on c"...
  4. Replies
    6
    Views
    29,104

    agreed but how do i initialize it? i tried ...

    agreed but how do i initialize it? i tried


    char *index[INDEXSIZE];


    inside the struct body while trying to initialize outside with this:


    st1.index[]={"debug","itterations","population",
  5. Replies
    6
    Views
    29,104

    initializing char array inside a struct

    hi there!

    here's my question. i've been struggling about 2 hours with this but haven't figured it out yet.

    suppose we have this string array



    char index...
  6. Replies
    18
    Views
    2,398

    thanks a lot i just learned that if i want to...

    thanks a lot i just learned that if i want to access an already allocated pointer with another i don't have to allocate it too :eek:
    pretty noob i think

    thank you very much... i appreciate your...
  7. Replies
    18
    Views
    2,398

    this is a snaphot of the code.i hope it helps...

    this is a snaphot of the code.i hope it helps because i can't find a point where the pointer is dereferenced.


    int **gene_pricing(int run_mode,int no_of_vehicles,int gene_dim,int *gene,
    int...
  8. Replies
    18
    Views
    2,398

    if i don't free in main the code seems to leak...

    if i don't free in main the code seems to leak exactly the double amount of bytes. doesn't this mean that the memory allocated in int **f() is never freed? but i can't free it before i return it.
  9. Replies
    18
    Views
    2,398

    i did as you said. it really works internally but...

    i did as you said. it really works internally but when i free it from main i still get leaks.
    any suggestions? i would post code but its pretty huge. i'll try to cut things out and maybe post it...
  10. Replies
    18
    Views
    2,398

    create,return,free

    i want to initialise,return and free a variable length 2-d array...
    suppose i do this:



    int **f(some input){

    int **p;
    p=malloc(dim_1*sizeof(int *));
  11. Replies
    17
    Views
    4,342

    if don't put close() the above are running cool....

    if don't put close() the above are running cool. prob_type can be LIN_KERN or LP. it is strange but it really works causing the execl() to choose right.
  12. Replies
    17
    Views
    4,342

    what is 1 inside the close() argument??? when...

    what is 1 inside the close() argument???

    when applying the above in my code and every executable once, the second produces funny results...



    void tsp_sol_call(char *exec_path,char...
  13. Replies
    17
    Views
    4,342

    i am on linux so i think i can get round this. ...

    i am on linux so i think i can get round this.

    thanx!!!
  14. Replies
    17
    Views
    4,342

    perhaps into a file or something??? if it is a...

    perhaps into a file or something??? if it is a file it would cost too much because these lines of code run hundreds of times solving a genetic. on the other hand you can't make an omelete if you...
  15. Replies
    17
    Views
    4,342

    :rolleyes: Another question on that. Is there any...

    :rolleyes: Another question on that. Is there any way to suppress all screen output produced by the executables while runtime??? supposed the execs themselves do not provide this option...
  16. Replies
    17
    Views
    4,342

    [QUOTE=panos]it just slipped away ignore it.it...

    [QUOTE=panos]it just slipped away ignore it.it works fine with or without it
    [/QOUTE]

    OMG it IS the problem... thanx i didn't really noticed.

    many thanx it works fine...
  17. Replies
    17
    Views
    4,342

    it just slipped away ignore it.it works fine with...

    it just slipped away ignore it.it works fine with or without it



    nope it's not perror
    here's the output


    panos@mate:/media/hda7/source_vrp$ ./project
  18. Replies
    17
    Views
    4,342

    problems calling an executable

    we have 2 executables being called exactly the same way:
    concorde : user@host:~/vrp/concorde/TSP$ ./concorde -o tsp_out input_file
    linkern : user@host:~/vrp/concorde/LINKERN$ ./linkern -o ...
  19. Replies
    18
    Views
    2,398

    thanks alot!!!

    thanks alot!!!
  20. Replies
    18
    Views
    2,398

    is there any way to retrieve the pointer value...

    is there any way to retrieve the pointer value externally while being able to free the memory it allocates? i guess that when the function returns all the allocated space will be unreachable to...
  21. Replies
    18
    Views
    2,398

    i can guess that there will be problems if i...

    i can guess that there will be problems if i free(p) and try to return p with int *f() ???
  22. Replies
    18
    Views
    2,398

    a noob freeing memory...

    supposed we have a this



    int func(){
    int *p;

    p=malloc(some,sizeof some);

    return something_else;
  23. Replies
    9
    Views
    1,402

    thanks a lot!!! :)

    thanks a lot!!! :)
  24. Replies
    9
    Views
    1,402

    another problem too. when i compile the above...

    another problem too. when i compile the above source i get the following messages:

    when compiling lin_call.c :

    lin_call.c: In function ‘lin_call’:
    lin_call.c:6: warning: incompatible implicit...
  25. Replies
    9
    Views
    1,402

    as if it would be the first thing they have...

    as if it would be the first thing they have ommited...

    ubuntu doesn't even have the basic gcc packages for gcc on first install. :(
Results 1 to 25 of 28
Page 1 of 2 1 2