By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

lvalue require error .i know the meaning of error but i cannot comeout from this.

P: 1
Cannot tackle this error
Char ch [23];
Char a;
Ch=a;

Error lvalue require
I need answes soon
May 9 '17 #1
Share this Question
Share on Google+
3 Replies


P: 23
Post the code that created this error. It will be easier to help you fix the issue than someone stating "this error is because of ____"
May 9 '17 #2

Expert 100+
P: 2,396
Change both instances of Char to char.
Pick either Ch or ch and then be consistent.
May 9 '17 #3

weaknessforcats
Expert Mod 5K+
P: 9,197
You have other problems:

Ch = a;

If you meant:

ch = a;

then this will not work. a is a char whereas ch is the address of an array. You cannot assign a char to an address of a char.

Worse, ch is a local (stack) array whose address is constant. It's the memory address of the array. You are never allowed to change the address of a local variable.
May 9 '17 #4

Post your reply

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