Error:
This is my die.cpp:
This is my die.h:
I'm not sure what I'm doing wrong. Did I leave something out of my .h file? Any feedback is appreciated.
Code:
Undefined first referenced symbol in file die() /var/tmp//cckddR2X.o ld: fatal: symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status
Code:
#include <math.h>
#include <string>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "die.h"
int die(){
srand (time(NULL));
int number = rand() % 6 + 1;
return number;
}
Code:
#ifndef __DIE_H #define __DIE_H int die(); #endif
Comment