2 errors: LNK1120, LNK2019 on line 1

I'm not sure what is causing these. I looked it up and since they are both directed to line 1 of my code, I figure "# include" list may be missing something or in the wrong order. Has anyone had this problem? Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  #include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

const double pi = 3.14159265;
const double grav = 9.8; // Earth gravity (m/s^2)

// Given time, angle, velocity, and gravity
// Update x and y values
void Trajectory (double t, double a, double v, double& x, double& y)
{
  x = v * t * cos (a);
  y = v * t * sin (a) - 0.5 * grav * t * t;
  return;
they are both directed to line 1 of my code

No, those are linker errors and do not refer to source lines.

Both LNK1120 and LNK2019 are the result of having undefined external references.

It would be helpful if you would post the exact text of those linker errors.
Topic archived. No new replies allowed.