Thread: Two quick questions

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    1

    Two quick questions

    Please I'm a beginner and I would like an answer to two questions

    1.) what is the meaning of -> in C++

    2.) Also, what is a custom mask as it applies to image processing?

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Ok, I can answer 1) -> is used to dereference a pointer and then access a member.
    So say you have
    Code:
    someObj * myptr = new someObj;
    
    myptr->someMemberFunction();
    it is the same as doing (*myptr).someMemberFunction()

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have absolutely no idea of "custom mask as it applies to images" - that requires further context to clarify that - it could mean MANY different things [if this is a homework question, it's probably a explained in some sense in the literature you have for the course, and that gives it the right context].

    a->b is a shorter/simpler version of (*a).b

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Two quick questions about open file dialog boxes
    By PJYelton in forum Windows Programming
    Replies: 5
    Last Post: 04-05-2005, 08:49 AM
  2. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 10:06 AM
  3. A quick question(s)
    By EvBladeRunnervE in forum C++ Programming
    Replies: 3
    Last Post: 02-17-2003, 09:39 PM
  4. 2 quick questions
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 11-29-2001, 12:32 AM
  5. A few quick questions...
    By cpp4ever in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2001, 09:28 AM