How To Find Errors In Dev C++
but i can't find the error.
if can, i don't want the header file because its difficult for me to find the error.
1 C:Dev-Cppincludec++3.4.2backwardiostream.h:31, from C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp
1 C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp from C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp
14 C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp `queue' has not been declared
14 C:Documents and SettingsAdministratorMy Documentsdatastructuredmain.cpp `queue' has not been declared
can someone solve my problem
this is my coding for main.cpp
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <cstring>
#include <iomanip.h>
#include <fstream.h>
//#include 'queue.h'
//#include 'list.h'
using namespace std;
const int Total_Minutes=1440;
queue::queue() (const T &id ,const int a_time ,const int s_time)
{
//void Simulation ();
class McDonalds
{
private:
int Customer;
int Customer_Id;
int Arrival_Time;
int Current_Service_Time;
int Hour_Waiting_Time;
int Total_Customers;
int Insert_Node;
McDonalds() { } // private default constructor
public:
McDonalds() : Customer_Id(0) , Arrival_Time(0), Hour_Waiting_Time(0) , Current_Service_Time(0),
Total_Customers(0)
{ }
void Simulation();
};
void McDonalds::Simulation()
{
int Customer_Arrival_Time=1, Total_Waiting=0 , Service_Time=0 ,j=0;
float Average_Waiting_Time=0;
Arrival_Time=1;
srand(time(0));
for (int minute=1 ; minute<=Total_Minutes ; minute+=Customer_Arrival_Time)
{
if (minuteArrival_Time)
{
++Customer_Id;
Current_Service_Time=(rand()%4+1) + 4;
Customer.Insert_Node(Customer_Id,Customer_Arrival_Time,Current_Service_Time);
Service_Time+=Current_Service_Time;
if (Service_Time>1440)
break;
else
Hour_Waiting_Time+=Current_Service_Time-Customer_Arrival_Time;
Arrival_Time=(rand()%3+1)+minute;
Customer_Arrival_Time=Arrival_Time-minute;
}
}
Total_Customers+=Customer_Id;
Total_Waiting+=Hour_Waiting_Time;
Average_Waiting_Time=Total_Waiting/Customer_Id;
outFile<<'--------------------------------------------------------------'<<endl;
outFile<<' M C D O N A L D S '<<endl;
outFile<<'--------------------------------------------------------------'<<endl;
outFile<<' 2 4 - H o u r S i m u l a t i o n'<<endl;
outFile<<'--------------------------------------------------------------'<<endl<<endl;
outFile<<'=> TOTAL CUSTOMERS : '<<Customer_Id<<endl<<endl;
outFile<<'=> TOTAL WAITING TIME (in minutes) : '<<Total_Waiting<<endl<<endl;
outFile<<'=> TOTAL WAITING TIME (in hour) : '<<Total_Waiting/60<<endl<<endl;
outFile<<'=> AVERAGE WAITING TIME (per customer): '<<Average_Waiting_Time<<endl<<endl;
outFile<<'--------------------------------------------------------------'<<endl<<endl;
if ((Average_Waiting_Time)>3)
outFile<<'The management has to increase the number of counters'<<endl<<endl;
else
outFile<<'The management need not increase the number of counters'<<endl<<endl;
outFile<<'--------------------------------------------------------------'<<endl;
Customer.Display_List(outfile);
}
int main(int argc , char* args[])
{
if (argc<1)
{
cerr<<'INVALID NUMBER OF ARGUMENTS';
return 1;
}
/*open file stream for the input and output
ofstream outFile(args[1], ios::out);
checks that the output file is open or not
if (!outFile)
{
cerr<<'unable to open the output file'<<endl;
return 2;
}
*/
string line;
ifstream myfile1 ('queue.h');
if (myfile1.is_open())
{
while (! myfile1.eof() )
{
getline (myfile1,line);
cout << line << endl;
}
myfile1.close();
}
else cout << 'Unable to open file';
string line;
ifstream myfile1 ('queue.h');
if (myfile1.is_open())
{
while (! myfile1.eof() )
{
getline (myfile1,line);
cout << line << endl;
}
myfile1.close();
}
else cout << 'Unable to open file';
// McDonalds Customers;
// Customers.Simulation(outFile);
system ('pause');
return 0;
}
int class (int T, int List);
{
template <class T>
class List;
//-------------------------------- N O D E C L A S S -----------------------------------
template <class T>
class Node
{
friend class List<T>;
public:
Node()
{
Service_Time=0;
Arrival_Time=0;
next=NULL;
}
Node(const T &id ,const int a_time ,const int s_time)
{
Customer_Id=id;
Service_Time=s_time;
Arrival_Time=a_time;
next=NULL;
}
Node(const T &id, const int a_time ,const int s_time , Node<T> *n)
{
Customer_Id=id;
Service_Time=s_time;
Arrival_Time=a_time;
next=n;
}
private:
T Customer_Id;
int Service_Time;
int Arrival_Time;
Node<T> *next;
};
//-------------------------------- L I S T C L A S S --------------------------------------
template <class T>
class List
{
public:
List()
{
Head=NULL;
Tail=NULL;
size=0;
}
List(const List<T> &);
~List();
void Delete_List();
void Insert_Node(const T & , const int , const int);
void Delete_Node(const T &);
void Display_List(ofstream&) const;
int Get_size() const
{
return size;
}
List& operator = (const List<T> &);
private:
Node<T> *Head;
Node<T> *Tail;
int size;
};
template <class T>
List<T>::~List()
{
Delete_List();
size=0;
}
template <class T>
void List<T>::Delete_List()
{
if (Head!=NULL)
{
Node<T> *currentptr=Head;
Node<T> *tempptr;
while (currentptr!=0)
{
tempptr=currentptr;
currentptr=currentptr->next;
delete tempptr;
}
}
Head=NULL;
}
template <class T>
void List<T> :: Insert_Node(const T &id , const int a_time ,const int s_time)
{
Node<T> *newptr=new Node<T>(id , a_time , s_time);
assert(newptr!=0);
if (Head0)
{
Head=newptr;
Tail=newptr;
}
else
{
Tail->next=newptr;
Tail=newptr;
}
size++;
}
template <class T>
void List<T> :: Delete_Node(const T &id)
{
if (Head0)
{
cout<<'n error : THE LIST IS EMPTY !';
}
else
{
Node<T> *Fatherptr=Head;
Node<T> *Sonptr=Head->next;
if (Fatherptr->Customer_Idid)
{
Head=Head->next;
}
else
{
while (Sonptr!=NULL)
{
if (Sonptr->Customer_Idid)
{
Fatherptr->next=Sonptr->next;
}
Sonptr=Sonptr->next;
Fatherptr=Fatherptr->next;
}
}
}
}
template <class T>
void List<T> :: Display_List(ofstream& outFile) const
{
if (Head0)
outFile<<'error : THE LIST IS EMPTY ! n';
else
{
Node<T> *currentptr=Head;
outFile<<'nnttC U S T O M E R L I S T'<<endl;
outFile<<'tt------------------------'<<endl<<endl;
while (currentptr !=NULL)
{
outFile<<'Customer Id :'<<currentptr->Customer_Id<<endl;
outFile<<'---------------------'<<endl<<endl;
outFile<<'Arrival Time :'<<currentptr->Arrival_Time<<endl;
outFile<<'Service Time :'<<currentptr->Service_Time<<endl<<endl;
currentptr=currentptr->next;
}
}
}
template <class T>
List<T> :: List(const List<T> &original)
{
size=original.size;
Node<T> *ptr=original.Head;
Node<T> *newptr , *lastptr;
while(ptr!=NULL);
{
newptr=new Node<T>(ptr->Customer_Id , ptr->Waiting_Time , ptr->Service_Time);
assert(newptr!=0);
if (Head0)
Head=newptr;
else
lastptr->next=newptr;
lastptr=newptr;
ptr=ptr->next;
}
}
template <class T>
List<T>& List<T> :: operator=(const List<T> &original)
{
if (this!=&original)
{
deleteList();
size=original.size;
Head=0;
Node<T> *ptr=original.Head;
Node<T> *newptr , *lastptr;
while(ptr!=0);
{
newptr=new Node<T>(ptr->Customer_Id , ptr->Waiting_Time , ptr->Service_Time);
assert(newptr!=0);
if (Head0)
Head=newptr;
else
lastptr->next=newptr;
lastptr=newptr;
ptr=ptr->next;
}
}
return ptr;
}
newptr
- How To Find Errors In Dev C Download
- How To Find Errors In Dev C File
- How To Find Errors In Dev C In Excel
DEV-C is a fully-featured integrated development environment (IDE) for creating, debugging and creating applications written in a popular C programming language. Even though tools for the development of C software have undergone countless upgrades over the years, a large number of developers located all around the world have expressed a wish to continue using DEV-C. The following errors popped up upon compiling is there a way to fix this in dev c??? Please resond.
The articles in this section of the documentation explain diagnostic error and warning messages that are generated by the Microsoft C/C++ compiler and build tools.
Important
The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may make many subsequent errors go away.
How to compile a program in Dev-C 4.9.9.2 in Windows 8? Solution is here- Are you having problem when you compile a program in Dev-C 4.9.9.2 don't worry i'll give you a proper and very simple solution for this problem. Nov 17, 2017 In Visual Studio, go to the menu bar and choose Help Send Feedback Report a Problem, or submit a suggestion by using Help Send Feedback Send a Suggestion. You may find additional assistance for errors and warnings in Microsoft's public forums.
To get help on a particular diagnostic message in Visual Studio, select it in the Output window and press the F1 key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool above to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the navigation pane on this page.
Note
Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page when you used F1 and you think the error or warning message needs additional explanation, let us know. You can use the feedback buttons on this page to raise a documentation issue on GitHub, or a product issue on the Developer Community site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion.
You may find additional assistance for errors and warnings in Microsoft's public forums. Or, search for the error or warning number on the Visual Studio C++ Developer Community site. You can also search for errors and warnings and ask questions on Stack Overflow to find solutions.
Apr 09, 2015 I have used graphics.h in dev cpp. Though I can't remember the exact steps I used to include it, but I think the below answer is correct. Source: How to configure graphics.h in Dev-C You can easily solve this problem, DEV-C do support gra. This file is considered a Developer (C/C/Objective-C Header) file, and was first created by orwelldevcpp for the Orwell Dev-C 5.11 software package. The first release in the Windows 10 Operating System for profilerlisttovector.h was on inside Orwell Dev-C 5.11.
For links to additional help and community resources, see Visual C++ Help and Community.
Feb 25, 2017 Barack Obama Singing Shape of You by Ed Sheeran (VERSION AUTO TUNE) NOW ON iTUNES - Duration: 2:44. Maestro Ziikos 17,641,359 views. Auto tune barack obama video. T-Pain Auto-Tunes Obama (VIDEO) Jimmy Kimmel celebrated the new iPhone app 'I Am T-Pain' which allows users to auto-tune themselves last night by having the rapper auto-tune Barack Obama. He took video of the president's health care reform speeches and inserted himself and his.
In this section
BSCMAKE errors and warnings (BKxxxx)
Errors and warnings generated by the Microsoft Browse Information Maintenance Utility (BSCMAKE.EXE).
Command-line errors and warnings
Errors and warnings generated by the build tools for command-line options issues.
Compiler fatal errors C999 - C1999
Errors that halt the C++ compiler (CL.EXE).
Compiler errors C2001 - C3999
Errors detected by the C++ compiler (CL.EXE).
Compiler warnings C4000 - C5999
Warnings for issues detected by the C++ compiler (CL.EXE).
Compiler warnings by compiler version
A list of the warnings introduced by each compiler version.
C Runtime errors (Rxxxx)
Errors generated at runtime by the C Runtime Library (CRT).
CVTRES errors and warnings (CVTxxxx)
Errors and warnings generated by the Microsoft Resource File To COFF Object Conversion Utility (CVTRES.EXE).
Expression evaluator errors (CXXxxxx)
Errors generated by the debugger and diagnostics tools.
Linker tools errors and warnings (LNKxxxx)
Errors and warnings generated by the linker and related tools (LINK.EXE, LIB.EXE, DUMPBIN.EXE, EDITBIN.EXE).
Math errors (Mxxxx)
Errors generated by the runtime floating-point math library.
How To Find Errors In Dev C Download
NMAKE errors and warnings (Uxxxx)
Errors and warnings generated by the Microsoft makefile tool (NMAKE.EXE).
Profile-Guided Optimization errors and warnings (PGxxxx)
Errors and warnings generated by the Profile-Guided Optimization (PGO) tools.
Project build errors and warnings (PRJxxxx)
Errors and warnings generated by the native C++ Project build system in Visual Studio.
Resource compiler errors and warnings (RCxxxx, RWxxxx)
Errors and warnings generated by the Resource Compiler (RC.EXE).
Vectorizer and parallelizer messages
Diagnostic messages generated by the vectorizer and parallelizer optimization compiler options.
Related sections
How To Find Errors In Dev C File
See also
How To Find Errors In Dev C In Excel
C/C++ Building Reference
Debugging in Visual Studio