Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
Lvalue required in function main
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
ehab mohamed
New Member
Join Date:
May 2010
Posts:
18
#1
Lvalue required in function main
May 3 '10, 08:37 PM
When i try to run this program it give me a message that Lvalue required in function main. What is the cause?
Attached Files
Untitled.jpg
(13.3 KB, 1872 views)
Banfa
Recognized Expert
Expert
Join Date:
Feb 2006
Posts:
9067
#2
May 3 '10, 08:55 PM
Use comparison == instead of assignment = in you if statement.
An lvalue is a something that can be assigned to more or less.
Comment
Post
Cancel
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#3
May 4 '10, 03:54 AM
By the way, you might prefer to change your printf format string from "%d" to "%d\n". The newline is needed because stdout is typically buffered I/O.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment