Thread: Confused about constructors

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    In other words, you need to create a new constructor that takes a filename.

  2. #2
    Registered User
    Join Date
    Sep 2007
    Posts
    36
    I know this probably sounds stupid, but how do I pass the filename to the constructor? I can't seem to find any examples! And why do I need 2 constructors? Can't I just add parameters to the one I am already using?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. still confused with constructors and private data members
    By freddyvorhees in forum C++ Programming
    Replies: 2
    Last Post: 07-26-2008, 09:29 AM
  2. Copy constructors; Best practices (and private)
    By Mario F. in forum C++ Programming
    Replies: 15
    Last Post: 06-23-2006, 04:42 PM
  3. constructors, arrays, and new
    By Thantos in forum C++ Programming
    Replies: 6
    Last Post: 05-30-2004, 06:21 PM
  4. confused.. in selecting my line of deapth
    By jawwadalam in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 05-04-2003, 01:21 PM
  5. Copy constructors and private constructors
    By Eibro in forum C++ Programming
    Replies: 5
    Last Post: 11-24-2002, 10:16 AM