hi, i have a small problem with the rand operator. at first i tried using it without srand but gave me the same value each time.
i have inserted srand(time(0)); but my compiler throws me up these errors:
1>c:\users\ben\documents\university work\year 2\c++\code\myc++\spritelab\asteroidsgame.cpp(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\ben\documents\university work\year 2\c++\code\myc++\spritelab\asteroidsgame.cpp(17): error C2365: 'srand' : redefinition; previous definition was 'function'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdlib.h(511) : see declaration of 'srand'
im not sure what they mean. my top bit of code looks like this:
#include "wrapGame.h"
#include <math.h>
#include <time.h>
#include <ctime>
#define PI 3.14159265
using namespace std;
srand(time(0));
im pretty sure this is right?