Thread: Help with implicit and explicit constructor calls

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    3

    Help with implicit and explicit constructor calls

    I feel I know what this is but I've been drawing a blank for an hour now.. How do you create an object of a class using an implicit constructor call? and how do you create an object with an explicit constructor call? both times with all arguments.

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Implicit constructors are any constructor that you can call using the assignment operator, so that it looks like initialization of a built in type. Explicit constructor calls are like implicit constructor calls, except the left-hand side of an implicit constructor call is actually an argument list (in between parens) and thus the = is gone

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Overload the..bool operator..?
    By 39ster in forum C++ Programming
    Replies: 18
    Last Post: 11-26-2008, 06:24 AM
  2. Replies: 6
    Last Post: 08-12-2007, 01:02 PM
  3. Explicit keyword
    By Mario F. in forum C++ Programming
    Replies: 5
    Last Post: 06-30-2006, 06:43 PM
  4. Implicit and Explicit
    By ripper079 in forum C++ Programming
    Replies: 2
    Last Post: 09-06-2002, 12:22 PM
  5. implicit explicit
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 01-22-2002, 04:10 AM