I have the below files iin visaul studio and it keeps advising me that I am missing a ';' before using or it will say I am missing a ';' after std and I can not find what the heck it is talking about. I know what the std and using is and as you can see from the code it is the correct places and spelled correctly. When put in another compiler it works fine. Any hep would be great.
*************Below is the file in the "source file" folder******************************
<code>
//Created: 05-06-2011
#include "task.h"
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char clientcode[8] = {'A','B','C','D','E','F'};
string name = "FIRST TEST PROCESS!!! DATA WILL NOT BE SAVED";
task t = task(clientcode, name);
return 0;}
</code>
***********************************END OF FILE**********************************
BELOW THESE FILES ARE IN THE HEADER FILES
****************CLASS(SPECIFICATION***********************************************
<code>
//Robert Burnam
// Created: 05-03-2011
//This is the specification file for my task class
#include <iostream>
#include <cstdlib>
using namespace std;
class task
{
private:
string taskName;
string taskDescription;
int UID;
char clientCode[8];
int numstep;
char answer;
bool correct;
struct step
{
int stepNum;
string Instruction;
};
step instructions [50];
tm timeinfo;
tm TODAY;
tm YESTERDAY;
bool DUE;
bool LATE;
bool DONE;
void setUID();
//This will set a random number as the UID for this task and so it is not altered this is a private functon
public:
task(char clientcode [], string processname);
//This function will create a new task and prompt the user for the intput for each field;
int getUID();
//This function will return the UID of this task.
string getName();
//This function will return a string which is the name of this task
void changeName();
//This function will prompt the user to change the name of this task
string getClientCode();
//This function will return the clientCode array as a string for the useer to see
void changeDescription();
//This will prompt the user what the description is now and allow them to change it.
string getDescription();
//This will get the description and return it as a string to the main function.
void ChangeInstructions();
//This function will prompt the user to change the Insturctions for the class step by step
void displayInstructions();
//This will display the instructions step by step for this task
void changeDueTime();
//This function will prompt the user to change the time that the task is due.
bool isDue();
//This function will decide wether or not the task is due ( will be true up to ten mintues fo the task being do)
bool isLate();
//This function will decide if the task is late (this is only based off of time not date!)
bool isDone();
// THis function returns wether the task has been completed or not
</code>
*******************END OF CLASS***************************
*************************Implementation File of class*********************
//Robert Burnam
//Created: 05-06-2011
//This is the implementation of the task program
#include "task.h"
#include <windows.h>
#include <string>
using namespace std;
task :: task(char clientcode [], string processname)
{
cout << "You are now creating a new task for " << clientcode <<"." << endl;
cout << "This task if for " << processname << " processing." <<endl;
cout << "This task should be only somewhat specific and not too general." <<endl;
cout << " For example, if you have to do Bankruptcies and Demographics for this client code, It may be better to use only one task for each one of the " << processname << "." << endl;
//set the name of the task
cout << "Now, we will need to fill in some information before this task can be completed." << endl;
cout << "Anything before the colon below will describe what you are entering and will show any restrictions to what you can enter, in parathesis, if there are any." << endl;
cout << "Name:" ;
//cin >> taskName;
cout << endl;
cout << "Comments(if you do not have any type \" none \". Then press enter): " << endl;
//cin >> taskDescription;
cout <<"This takes care of the easy parts of creating this task. The next step will involve filling in each step indivivualy." << endl;
cout << "If you need sometime to decide how many steps you will need and in which order they will be entered, please take your time as I will wait till time indefinite for your input!" << endl;
cout << "I will first ask how many steps there are and then you are to enter the steps in numerical order you would like them to be listed starting with 1." << endl;
do{
cout << " How many steps are there for this task to be completed?: ";
cin >> numstep;
cout << " It seems that I am going to be creating " << numstep << "." <<endl;
cout << " If this is correct press y(yes) or n(no): ";
cin >> answer;
}while(correct == false);
cout << endl;
cout << "One moment, I am creating " << numstep << "s, should not take to long." << endl;
}
</code>
****************END OF IMPLEMENTATION FILE********
} |