Like Tree2Likes

must be a modifiable lvalue error

This is a discussion on must be a modifiable lvalue error within the C++ Programming forums, part of the General Programming Boards category; That's good. Now, if you want to learn more on how to do this well, read up on the stuff ...

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,772
    That's good. Now, if you want to learn more on how to do this well, read up on the stuff in <algorithm>. You can use a generic algorithm to "remove" the characters that are vowels (actually shifting them to the back rather than really removing them), then use the range version of erase to remove them for good at one go.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #17
    Registered User
    Join Date
    Jun 2011
    Posts
    2,380
    So when i want something to literally equal 0 i do one and when i want it to emulate something its two equal signs?
    I feel that you're not grasping the core difference here. To water it down:

    The assignment operator (=) makes one thing another (changes its value).

    The comparison operator (==) checks to see if one thing is the same as another (checks its value).

    Code:
        int a;
        a = 15;
    So this code declares an integer called 'a', then assigns it a value of 15.

    Code:
        int a;
        a = 15;  /* assigns a value of 15 to 'a' */
    
        if(a == 20)  /* compares the value of 'a' to 20; 20 is not 15, so this fails */
            printf("'a' is 20\n");
        else
            printf("'a' is not 20\n");
    This code declares an integer called 'a', assigns it a value of 15, and checks to see if it's equal to 20.

  3. #18
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,629
    For future reference, std::out_of_range means you are trying to access an element that does not exist.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error: lvalue required, pretty sure it's an lvalue
    By brandones in forum C Programming
    Replies: 18
    Last Post: 08-22-2011, 08:06 PM
  2. lvalue error
    By roaan in forum C Programming
    Replies: 6
    Last Post: 08-13-2009, 10:09 PM
  3. modifiable lvalue error
    By tsantana in forum C Programming
    Replies: 2
    Last Post: 06-10-2009, 10:58 PM
  4. non-lvalue error
    By zlb12 in forum C Programming
    Replies: 1
    Last Post: 04-17-2009, 10:43 AM
  5. lvalue error
    By paperbox005 in forum C Programming
    Replies: 4
    Last Post: 04-10-2005, 12:18 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21