Ok I tried that. I guess it's not an alignment problem. Here is the code for the whole function. n data.n and data.N are all different variables.
int allocate_bayes(Bayes &bayes, int n)
{
// bayes.px0c0 = (double*) calloc(n,sizeof(double));
// bayes.px0c1 = (double*) calloc(n,sizeof(double))...
The way I allocated px0c0 and px0c1:
bayes.px0c0 = (double*) calloc(n, sizeof(double));
bayes.px0c1 = (double*) calloc(n, sizeof(double));
Then I used a for loop to initialize all of them. They all contain valid values.
I need help. I keep getting a Bus Error when I run my program and I've narrowed down where it occurs to the following code fragment.
px0c0 and px0c1 are type double pointers and
count_x0c0[m] and countc0 are integers. Can anyone see why this code would be giving me a Bus Error? Thanks.
// set...
I am trying to write a Kornshell function that takes a string parameter which represents a filename or directory name. The function checks to see if there are any spaces in the filename or directory name and then replaces the spaces with an underscore. The returned value is a filename or...
I need a KornShell script that will, among all the users currently logged on to the system, find a slot of one hour that contains the most number of users. I know how to list all the users currently logged on but how do I do anything with the times that are listed? Please help, thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.