In a makefile what is the difference between the operators % and *
%.c and *.c they both mean all files with .c extension
Type: Posts; User: ali.franco95
In a makefile what is the difference between the operators % and *
%.c and *.c they both mean all files with .c extension
Had started my project on 1st of Sep. Completed it today and it works. I wanted to thank all the people/helpers/tutors for their help. Internet, what an awesome thing, ay!
yes that work. thanks. I have a different problem now ( I have been working on the problem continuously so sorry, if it seems like I am asking too many questions).
Previously I did as is shown in...
After dynamically allocating my arrays, I think I have seen some speed gains in my code down from 13sec to 11sec. Am I imagining this (could be that I am not listening to music as I am executing the...
Hi,
what is the syntax for dynamically allocating a 2d array. My 2d array has large dimensions and so have to be dynamically allocated.
// I want double array[5000][5000]
// so I did...
got your point
thank you.
Nah I am not getting a segmentation fault. I am going to the debugger.
I have encountered the problem first time, and only today so I could not have posted it previously. Are you being sarcastic about the fact that I did not post my code? My code is several files and...
I have a function that solves a differential equation.
Every thing works fine. I feed it an array of x-values and y-values and it solves the equations and puts the answer in the array of y-values....
I see. I thought about it. On the one hand given that most modern CPUs have GiB of memory (mine as 2 GiB), I thought 5MB should not be a big deal. I have not tried it with malloc but I will in...
Consider the following:
struct half_Sol{ double a;
int size;
double *x;
double y_one[13][2500];
double...
How does one pass a 2 dimensional array to a function and modify it in the function. I thought I knew this.
For example a function that modifies a one dimensional array is declared as
void...
Because in another part of the code when I switched from exp to expl it got rid of some problems. I am guessing it is an over/underflow problem because for a sequence of numbers that get closer to...
I have a function that gives me log(y) and derivative of log(y) call it dlog(y) . However I am interested in knowing y and derivative of y call it dy. Now I get dy as follows
dy = exp( log...
perhaps f is some macro. like this
#define f 000345
so that 100.f becomes 100.000345
thanks guys. I was confused because, I imagined that extern replaces inclusion in aheader file. for example, If I don't include the array in the header file and just access it from an other file with...
I don't doubt that you are right. I am just trying to figure out why it true. In the header file if I do this then I don't have the problem you are suggesting.
#ifndef HEADER_H
int...
Yes true. But if you did not use the keyword extern it would do exactly the same thing. At-least running it I get that impression.
why did you use the keyword extern in the headerfile? You would not do it for a function.
To use a func_one from one file in another file you just include the func_one declaration in a header file and include this header file.
Now if you want an array defined in one file to be...
Is using the long double version of mathematical functions slower than using just the normal (double) versions? Just curious.
thanks buddy. Don't want n+1 size array. Just had to divide by n-1 to include the endpoint instead of n
Let x_ini be the initial value and x_fin be the final value in a sequence. If I want to create an array of n points The I just go
x[i] = xini + (xfin - xini)*i/n
this creates an array...
Consider a set of x and y values. i.e
#define SIZE 100
double x[SIZE];
double y[SIZE];
Now I do the follow.
1) allocate memory for an interpolation function call it f.
2) implement code...
I have written a program that prints out all the permutations of the characters in a string literal. I have a segmentation fault and for the first time using a debugger (gdb). How do I include the -g...