Here is the code
int fact(double i)
{
if (i<=1) return 1;
else return i*fact(i-1);
}
int nCi(double i)
Type: Posts; User: rich999
Here is the code
int fact(double i)
{
if (i<=1) return 1;
else return i*fact(i-1);
}
int nCi(double i)
Now im getting a few run time errors, and a warning saying int nCi has not been used, when it looks to me that is has been used.
I am in a world of pain.
Bollocks :mad: !!
Thanks for pointing that out.
You don't know how long i spent trying to figure out what was going wrong there as well.
Blonde moment there!
yeah i get that warning that the statment has no effect.
So how do i get the statement to actually execute and run the functions, rather than just being a reference to it?
I am trying to get a bezier curve drawn in a program.
These are the functions i have written for calculating the points, however it doesnt quite work and my brain has started to hurt so i need a...
Thats the assignment treenef yeah.
I do find it pretty hard.
I have done the addition now though amazingly.
Stuck on scaling the line by multipying the matrix.
It has to be done in a [2][3]...
thanks for the help everyone.
I understand the maths behind matrix addition and multiplication etc...
But i's implementing it in c++ thats the problem.
Here is my function:
void...
I want to perform matix addition between a single dimensional array, and the matrix that has stored the data in the working functions i already have.
This is the code i have so far.
#include <stdio.h>
#include <stdlib.h>
void enter_point(double point[3]);
void translate(double point[2][3]);
void scaling(double point[2][3]);
Well we knew he was crap anyway.
Don't even think he is a proper lecturer either, just a 3rd year undergrad who was drafted in at the last minute.
Thanks guys thats alot of help.
If it is C and not C++ then our lecturer must be stupider than I thought. He has been teaching it as ++, and although I suck at it I have been doing what he has...
Yes this is for my homework.
I am not lazy getting other people to do it for me i am just stuck.
This is the code i have. It sux and has too many errors to even list the errors on my compiler.
...
Im new to this C++ stuff and have to learn it for my university.
Could someone please give me some example code of how to do translation of matricies as this would be of amazing help.
Thanx.