Oh dear... That's exactly it, I was looking in the wrong function!!
My apologies!
I have these same variables in a similar function below this function, after fixing the first warning I forgot...
Type: Posts; User: Ayreon
Oh dear... That's exactly it, I was looking in the wrong function!!
My apologies!
I have these same variables in a similar function below this function, after fixing the first warning I forgot...
I get the following warnings during compile:
jacobian.c: In function ‘dF2_di’:
jacobian.c:71:25: warning: variable ‘Dr2’ set but not used [-Wunused-but-set-variable]
jacobian.c:71:14: warning:...
@Laserlight: I tried this and it seems to work. I just got in trouble now with one of the variables which is an array.
@tabstop: Tried this too, but must have had problems somewhere else for it did...
So for example I would need a function that creates M, which is m1+m2, and also returns it. But then every time I call this function in stead of calling a global variable M, it would have to...
Then where does this value go, so that all other files can see it?
Wouldn't that mean that every time a function in one of the other .c files uses one of the variables, that it needs to call a function that creates this variable? That's exactly what I am trying to...
Ok, now i'm getting a multiple definition error. This might be due to the inclusion of the .h files in several .c files, but if I don't do that it tells me the variables I want to use are not...
In my many attempts to fix my code I might have tried this already, but I was also using static and extern all over the place.
Now all I have in my header file is (just an example):
double x;
in...
My code is spread out over several .c files and their respective header files. I have one header file (without a .c file), which contains the definitions of some variables I wish to use in all other...
You know, i did have a feeling I was making things too complicated like this, but I didn't know another method. But I'll think about vector projection in the form of dot products and such, that might...
Thanks for that. That might help :).
The ball is supposed to bounce of this line/surface. What it does, is slide along it, as if this surface attracts the ball. But, when the ball has a certain velocity, and I give the ball a little...
This:
(12.0+tan(alpha)*(xpos-33.0)) + R_ball/cos(alpha)
Is a line of an inclined surface.
If the y position of the ball is < or = this line then:
add this to the x velocity component:...
I'm sorry, I didn't think of that. I thought you could just assume all those angles and stuf are correct.
I think the problem lies in something else than the mathematics, since it will work when the...
I've got a pinball machine (a very lame one, but the point is to make it work as an assignment). I made the collisions with the sides and the top arch work, but i'm having trouble with two slopes at...
Meanwhile I got around the flashing screen problem by going into 'game mode'. This mode puts it in full screen, and it works.
It has worked for quite some time by now, but i thought i'd let people...
This is the drawing code:
void progDisplay (void)
{
/* Clear the redering window */
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Actually I'm not sure what I'm doing. I copied the buffer method from an example program. But the only thing different in my program is the stuff I draw (Just a couple of lines).
I'm trying to draw a moving object in an openGL window. The problem is that even without anything moving yet, the screen flashes like crazy and it uses my cpu for about 95%. I already used double...
Thanks vart, that was the problem :). Needed a fresh pair of eyes apparently.
I made a loop which reads from some lines a file.
It works fine but now I want the loop within another loop.
Once I remove the now commented loop in this code, it doen't show the printf anymore:...
No it compiled fine, that's not why I asked. I'm just used to defining functions before the main. This may actually be a nice way to put all the function details behind the program so that I won't...
Thanks!
Why is Gotoxy() not defined in one piece above the main, why this method?
Yeah, those are really interesting! Though red ones are the coolest.... ;)
Ah, you know it too :p.
Thanks for the struct tip. I'll try using that.
I hope I can make that SetConsoleCursorPosition work. It's not really an important thing for my program, but it's fun :)....
I'm not sure I understand what you mean by that, I'm not marrying C :). I am open to suggestions for using other languages(The one you just mentioned looks handy), but not right now, because I've...