thanks
Type: Posts; User: Azmeos
thanks
Here is my main function:
/* CSE 231 Project 5 Solution
This file simulates the madlib game by reading a user inputted
file which contains the story line embedded with #XXXX#.
*/
...
Ok, so
magnitude = sqrt(x^2+y^2+z^2);
where x, y and z are really x1-x2, y1-y2, and z1-z2 ?
I see. So, then I just multiply (or do I add??) those new values to the current coordinates? And we still have to deal with the issue of the speed. How does that come in? Just a multiplication? And...
Hrm, I still don't quite understand. What am I dividing it by? Please explain a bit more.
black - by normalizing do you mean to take the cross product?
fib - I don't quite catch what you mean. Could you explain a little furthur?
I guess I have to calculate the angles? I am given three pieces of information: The current coordinates, the desination coordinates, and the speed. For now, direction of the spaceship does not matter...
Here's what I'm doing:
Moving a space ship from one point in space to another point in space at a constant speed.
Here's my question:
How do I calculate the per-second vector components of...
PLEASE use code tags.
do a SWITCH sentence...
switch(sign) {
case '*':
answer = first_number * second_number;
break;
case '+':
#include <stdio.h>
#include <iostream.h>
int main()
{
int first_number = 0;
int second_number = 0;
int answer = 0; //adding 1st and 2nd number here has no effect... since they are both...
And those questions are...?
You still have some spelling errors:
sruct attribs should be
struct attribs
I also think you need to
#include <string>
For all of you who were helping me with it, thanks... I figured it out!
Can anyone help me?
Thanks guys, for helping me... however... when I tried JawiB's code, it runs each one 7 times... which I don't want. it should run it once, checking through each one 7 times. here's the updated...
http://www.webopedia.com/TERM/D/DLL.html
I have added comments to show what I believe this does... Please correct me if I'm wrong. And if there's an easier/better/right way to do it.
(it says PHP but that's just so you can see the color...
ok, I made that change... but I'm trying to isolate the problem of why my program won't work (properly) ... Do you think this is all working properly? This part, at least.
Why not just store it as a member function in a class?
mhmm.
#include <iostream>
using namespace std;
int main()
{
int i=1;
cout << i; /*i=1*/
i++;
cout << i; /*i=2*/
First off, please use [ code ] tags... second off, instead of putting
int test();
all by itself, just move the function above the main() function so that the compiler understands.
Like...
++count; Increases count by 1.
count--; Decreases count by 1.
I actually did change it to this...
const unsigned int bit[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
int binValue = 0;
int count = 0;
int j = 0;
for(int k=0; k <...
Thanks everyone, with your help I figured it out. Now it works, the binary is converted properly. Now I just have to figure out how to get it to read up to a non-multiple of 8 ... Say I have a 10x10...
Here is a simpler version of what I'm trying to do...
#include <iostream>
using namespace std;
int main() {
int val = 255;
int result = 0;