LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2015, 12:47 AM   #1
pradeep5592
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Rep: Reputation: Disabled
why this error - in this function


int del()
{
int element;
if(front==-1 || front=rear+1)
{

printf("queue is empty\n");
return;
}
element =queue[front];
front=front+1;
printf("%d has been deleted", element);
return element;
}

error ---> function ‘del’:
error: lvalue required as left operand of assignment
 
Old 06-18-2015, 12:55 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
probably because you used assignment operator instead of comparator:
if(front==-1 || front==rear+1)
otherwise the information you gave is not enough to be sure
 
1 members found this post helpful.
Old 06-18-2015, 12:59 AM   #3
pradeep5592
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks a lot that was the only error.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Function error slufoot80 General 1 08-27-2012 01:35 PM
GnuTLS error -53: Error in the push function | vsftpd and explicit FTP over TLS Kaiser Soze Linux - Server 0 09-05-2011 05:53 PM
[SOLVED] Error Executing function. pinga123 Linux - Newbie 3 07-09-2010 11:57 PM
[SOLVED] g++ error message no matching function for call to some function Jerry Mcguire Programming 6 04-13-2010 08:37 PM
error recursive function in c shams Programming 3 07-28-2004 08:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration