Error 2106 Visual Studio
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Visual Studio 2016
site About Us Learn more about Stack Overflow the company Business Learn more
Strcpy
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up C++ error https://msdn.microsoft.com/en-us/library/wxy5f14h.aspx C2106: '=' : left operand must be l-value up vote -3 down vote favorite Okay, so, ignoring my lazy coding (this is just to get the program to work, I'll clean it up after I get it working). I've set up a couple of if statements that will throw exceptions if I don't get the input I'd like. #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://stackoverflow.com/questions/28256556/c-cant-figure-out-this-error-c2106-left-operand-must-be-l-value Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack http://cboard.cprogramming.com/cplusplus-programming/117951-error-c2106-=-left-operand-must-l-value.html Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up C - Can't figure out this error must be : “C2106: '=' : left operand must be l-value” up vote -2 down vote favorite I am using Visual Studio 2013 to try and learn C language. I'm using the famous K&R book and after literally copying and pasting the following piece of code from the book to Visual Studio 2013 i got the error : 1 error C2106: '=' : left operand must be l-value left operand must 2 IntelliSense: expression must be a modifiable lvalue #include
Programming Boards C++ Programming error C2106: '=' : left operand must be l-value Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get a compiler | Fixes for common problems Thread: error C2106: '=' : left operand must be l-value Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-26-2009 #1 janicecp View Profile View Forum Posts Registered User Join Date Jul 2009 Posts 4 error C2106: '=' : left operand must be l-value hi, I get this error: error C2106: '=' : left operand must be l-value after compiling my program using Microsoft Visual Studio 2008. But this error didn't appear at all if I compile my program using Microsoft Visual C++ 4.0. Please advise. Thanks. The line of coding is as below: IMG_MAXREC = GetPrivateProfileInt("File", "MaxRec",10000, ABC_INIFILE); 07-26-2009 #2 Spidey View Profile View Forum Posts Webhead Join Date Jul 2009 Posts 285 IMG_MAXREC Is the a macro ? If it is, then you cant reassign it a value as it doesn't have an address(l-value) in memory. 07-26-2009 #3 janicecp View Profile View Forum Posts Registered User Join Date Jul 2009 Posts 4 but what is macro? this is the declaration: int IMG_MAXREC; but it is from another program. (exe) 07-26-2009 #4 Cactus_Hugger View Profile View Forum Posts int x = *((int *) NULL); Join Date Jul 2003 Location Banks of the River Styx Posts 902 But this error didn't appear at all if I compile my program using Microsoft Visual C++ 4.0. Isn't that from Windows 95? long time; /* know C? */ Unprecedented performance: Nothing ever ran this slow before. Any sufficiently advanced bug is indistinguishable from a feature. Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31. The best way to accelerate an IBM is at 9.8 m/s/s. recursion (re - cur' - zhun) n. 1. (see recursion) 07-26-2009 #5 janicecp View Profile View Forum Posts Registered User Join Date Jul 2009 Posts 4 it's from Windows XP. I can't understand why once I tried to compile my programs with Microsoft Visual Studio 2008 instead of Microsoft Visual C++ 4.0, it will gives me errors. 07-26-2009 #6 janicecp View Profile View Forum Posts Registered User Join D