F:\Mastermind\guess.h|14|error: ISO C++ forbids declaration of `linked_list' with no type|
Once I get started I have most of the logic thought/written out myself. I just need help setting up the linked lists and getting the rest of the structure of the program correct. Thank you for all your help. I'll be back on in about an hour to check your replies. In the meantime I have some coding to do!
HERE IS THE MAIN.CPP
#include <iostream>
#include <string>
#include <time.h>
#include "guess.h"
//#include "linked_list.h"
using namespace std;
int main()
{
Guess MyGuess;
INT_MAX = 6;
srand(time(0) % INT_MAX);
{
int number = rand() % 6 + 1;
}
//Creates a list for the answer
linked_list<char>* answerList;
//Creates a list for your guess
linked_list<char>* guessList;
guess::promptGuess();
}
HERE IS THE GUESS.CPP
#include <iostream>
#include <string>
#include <time.h>
#include "guess.h"
//#include "linked_list.h"
using namespace std;
int main()
{
Guess MyGuess;
INT_MAX = 6;
srand(time(0) % INT_MAX);
{
int number = rand() % 6 + 1;
}
//Creates a list for the answer
linked_list<char>* answerList;
//Creates a list for your guess
linked_list<char>* guessList;
guess::promptGuess();
}
HERE IS THE GUESS.H
#ifndef Guess_H
#define Guess_H
#include <string>
#include <iostream>
using namespace std;
class Guess
{
public:
Guess();
void PromptGuess();
linked_list<char>* GetGuess();
//Function Description: Prompts user for their guess.
//Parameters: None
//Output: None
char RandomColor();
//Function Description: Randomly generates 4 colors
//Parameters: None
//Output: The color assigned to that number
linked_list<char>* RandomSequence(int number);
//Function Description: Randomly generates a list of chars
//Parameters: Number of char to generate
//Output: Linked list of randomly generated chars
int FindBlacks(linked_list<char> &AnswerList, linked_list<char> &YourList);
//Function Description: Compares your guess to the answer for exact matches
//Parameters: The answer list and your list
//Output: Number of exact matches
int FindWhites(linked_list<char> &AnswerList, linked_list<char> &YourList);
//Function Description: Compares your guess to the answer for similar matches
//Parameters: The answer list and your list
//Output: Number of similar matches
bool Judge(linked_list<char> &AnswerList, linked_list<char> &YourList);
//function Description: Gives the number of exact and similar matches
//Parameters: The answer list and your list
//Output: Returns true if you have exact matches and false if not
private:
};
#include "guess.cpp"
#endif // GUESS_H_INCLUDED

New Topic/Question
This topic is locked



MultiQuote





|