473,320 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

unqualified id before delete which i use as function what's the error

#include<iostream>
using namespace std;
int queue1[5];
int rear= -1, front= -1;

void insert(int x)
{
if(rear>=4)
{
cout<<"queue overflow";
return;
}
queue1[++rear]=x;
cout<<"value inserted"<<x;
}

void delete(int x)

{
if(front==rear)
{
cout<<"queue is underflow";
//return;
}
cout<<"deleted item "<<queue[++front];

}
void display()
{
if(rear==front)
{
cout<<"queue is empty";
return
}
int queue1[5];
int rear= -1, front= -1;
}
int main()
{


int choice;
while(1)
{
cout<<"press 1.enqueu,press 2.dequeu,press 3.display,";
cin>>choice;
switch(choice)
{
case 1: cout<<"enter the element";
cin>>choice;
insert(choice);
break;
case 2:delete();
break;
case 3:display();
break;

}
}
}
Nov 24 '15 #1
1 2506
weaknessforcats
9,208 Expert Mod 8TB
The word delete is part of the C++ language. You can't use it for a function name.
Nov 24 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Shilpa | last post by:
We are using Java Stored Procs to pull data from application DB2 tables and the final output is written to a file. Stored Procs are structured as mentioned below: There is a driver table from...
2
by: PA | last post by:
Hi All, Thanks for your attention..I appreciate that. -----Problem description -----------Start---------------------- Database : DB2 UDB 8.2 on Windows 2003 Client: VB6/ADO 2.7 on Windows...
0
by: nagaraj_hayyal | last post by:
hi all, i am a c++ developer facing a problem with DB2-CLI on AIX5.2. we are using db2 v8 fixpak 10, gcc 3.3.2, on aix5.2 with extensive use of STL vectors. we are using ODBC 3.0 for our...
2
by: tommydkat | last post by:
Hi! I'm updating a Windows application that we develop that uses a DB2 database. We switched from using Microsoft Developer Studio 6 to Visual Studio .Net 2003 to build our app and since that...
4
by: Racerx | last post by:
Hi All: I use db2 v8.1 AIX 5.2 Today we recieved an error at the use machine (db2 client) while loggin into one of the applications. The details of the error message are: CLI0125E...
4
by: Szymon Dembek | last post by:
Hi Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on a problem I cannot resolve. When I issue a delete statement that deletes no rows (no rows qualify for the WHERE...
10
by: JRough | last post by:
I have a function definition error: Warning: Missing argument 2 for makexcldata(), called on line 123 and defined in on line 149 "Warning: mysql_fetch_row(): supplied argument is not a valid...
1
by: michaeldebruin | last post by:
I am trying to make an application which acts a bit like a database. The only 2 problems are, that I don't know how to make a script which can delete a name in a file using streamwriters and...
17
by: AffinityCreate | last post by:
Hi, Not quite sure if someone will be able to help me but.......... I am currently trying to build a menu layout for a 20x4 LCD. I originally had the LCD working with the keypad to have a...
3
by: AffinityCreate | last post by:
Hi I am trying to add the DS1307 to my project via I2C using both a keypad and LCD. So far I have been able to get my project working with a passcode entry, led, keypad input and LCD display. I as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.