IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
C++
Search C++ Group:

Advanced
-Collapse +Expand C++ To/From
To/FromCODEGuides
-Collapse +Expand C++ Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C++ Store
PRESTWOODSTORE

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyC++ BoardC++Builder Topic   Print This     

error C2106: '=' : left operand must be l-

error C2106: '=' : left operand must be l- in C++Builder topic (part of our C++ group).

Quick Search: operand   error C2106   error C2106 =   left operand   must be   l   
Arrummzen
 (Inactive)
-- USA

I am writing a program and get a error on this line
--------------------------------------------
hold + KEY = sum;
--------------------------------------------
hold is a char that = 0
KEY is a char that = 0
sum is a long that = 0
--------------------------------------------
i tryed using a char and int for sum alredy
--------------------------------------------
Thank you and please no flame... Eek!

 Posted 21 years ago (Thread Starter)
Comment Quote
About Arrummzen -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #3827, 1 replies
Thread Started 9/20/2001 7:44:00 PM
View Counter=6985
Last Reply Posted 11/10/2001 4:10:00 AM)
Location=-- USA 
Joined=21 years ago   MB Posts=1  
Most Recent Post
greg hicks
Australia
Hi Arrummzen,

The problem stems from the fact that the compiler sees the '=' and looks to the Right Hand side (r-value) to assign into the Left Hand Side (l-value)

basicakky you have the equation backward, so you should have this:

int main()
{
char hold='A'; //65 decimal
char KEY='a'; // 97 decimal
int sum=0; // this is the resultant

sum = hold + KEY; // this would give 162
}

Now that
regards


Gregory Hicks
 Posted 21 years ago
Comment Quote
About greg hicks -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #4299 (Level 1.1)  Reply to 3827
Thread Started 11/10/2001 4:10:00 AM
View Counter=2
Location=Australia  
Joined=21 years ago   MB Posts=10  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1183A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #3827 Counter
6985
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2022 Prestwood IT Solutions.   [Security & Privacy]