nice fractions?
the only thing i want to assume is float range and positive values...
Type: Posts; User: panos
nice fractions?
the only thing i want to assume is float range and positive values...
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>...
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"...
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",
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...
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...
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...
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.
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...
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 *));
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.
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...
i am on linux so i think i can get round this.
thanx!!!
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...
: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...
[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...
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
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 ...
thanks alot!!!
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...
i can guess that there will be problems if i free(p) and try to return p with int *f() ???
supposed we have a this
int func(){
int *p;
p=malloc(some,sizeof some);
return something_else;
thanks a lot!!! :)
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...
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. :(