473,395 Members | 1,412 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,395 software developers and data experts.

Lvalue required in function main

When i try to run this program it give me a message that Lvalue required in function main. What is the cause?
Attached Images
File Type: jpg Untitled.jpg (13.3 KB, 1775 views)
May 3 '10 #1
2 6272
Banfa
9,065 Expert Mod 8TB
Use comparison == instead of assignment = in you if statement.

An lvalue is a something that can be assigned to more or less.
May 3 '10 #2
donbock
2,426 Expert 2GB
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.
May 4 '10 #3

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

Similar topics

5
by: Sai Krishna M | last post by:
Lvalue Required......Why? Hello all, the following code is not compiling in Turbo C and the error is "Lvalue Required" . main() {
13
by: wessoo | last post by:
Hi All. What is The Lvalue Required error message. (What does it mean?Is it an abbreviationof something.) I wrote this test program and I am keeping geting this message. void main() {...
8
by: Rody Reulen | last post by:
I made an console application with Visual Basic .net. Visual Basic will automatically create the sub procedure main for you. I try to convert the main procedure to a function. During the...
1
by: joe10001 | last post by:
Hi all, I just installed CRELoaded (oscommerce fork) on my server and all work fine except that I have a little message at the bottom of the main page : Fatal error: main() : Security alert:...
7
by: Hexer | last post by:
Hi and good day to all...I am new to the C language and whenever I tried to run the program I made, it won't because it says it has an "expression syntax error in function main"..what I don't get is...
4
by: huggsy | last post by:
I started using C just today and I am having a problem with strrev() function. Here are my codes: #include<stdio.h> #include<conio.h> #include<string.h> main()
4
by: ramesh nambiar reloaded | last post by:
#include<stdio.h> #include<string.h> #include<conio.h> #include<dos.h> // #include<object.h> const char *hex = "0123456789ABCDEF"; char *bin2hex(char *string); int...
0
by: pecca | last post by:
this is sample of my program #include<iostream.h> #include<conio.h> #define n 5 int total(int number); int average(int average, int total); void min_max(int number,int &min,int &max); void...
1
by: DavidSS | last post by:
Okay, I have a problem. I just started programming, and made my first "calculator" I then started making it more advanced, so it wouldn't crash if you tried to divide by 0. Then I wanted to make...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.