LinuxQuestions.org
Visit Jeremy's Blog.
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, 01: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, 01:55 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
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, 01: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:35 PM
GnuTLS error -53: Error in the push function | vsftpd and explicit FTP over TLS Kaiser Soze Linux - Server 0 09-05-2011 06:53 PM
[SOLVED] Error Executing function. pinga123 Linux - Newbie 3 07-10-2010 12:57 AM
[SOLVED] g++ error message no matching function for call to some function Jerry Mcguire Programming 6 04-13-2010 09:37 PM
error recursive function in c shams Programming 3 07-28-2004 09:44 PM


All times are GMT -5. The time now is 12:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration