Results 1 to 16 of 16

Thread: About a stange issue with a map variable inside a const function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default About a stange issue with a map variable inside a const function

    I have a map<int<map<int,char> > variable.
    It is declared at the private section of my .h file :

    map<unsigned int,std::map<unsigned int,char> > map__type;
    I also have :
    vector<string> vecHheader;

    I use it in this function with sufix const keyword
    myfunction (bla bla) const

    Ok I can return vector information but not map ???
    ( I have the const error : ... bla bla bla dicard qualifiers.)

    Whats happen ? I can not use map into a const functions ? I want only to returning information !

    Any idea ? Thanks .


    And , If I made mymap mutable... What can I expect from mymap or const function perfomance ?
    Last edited by tonnot; 14th April 2011 at 16:26.

Similar Threads

  1. Emit signal from const function
    By waynew in forum Qt Programming
    Replies: 9
    Last Post: 22nd August 2010, 13:10
  2. emitting signals in const function
    By maxel in forum Qt Programming
    Replies: 3
    Last Post: 19th October 2008, 15:05
  3. Replies: 6
    Last Post: 7th October 2008, 12:14
  4. subclassed const function problem
    By qtneuling in forum Newbie
    Replies: 8
    Last Post: 22nd June 2008, 02:52
  5. const function parameter problems
    By stevey in forum General Programming
    Replies: 3
    Last Post: 18th December 2006, 22:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.