no appropriate default constructor

This is a discussion on no appropriate default constructor within the C++ Programming forums, part of the General Programming Boards category; I am making a program and I am getting this error: C:\trigger state.cpp(182) : error C2512: 'Sensor' : no appropriate ...

  1. #1
    Shadow12345
    Guest

    no appropriate default constructor

    I am making a program and I am getting this error:
    C:\trigger state.cpp(182) : error C2512: 'Sensor' : no appropriate default constructor available

    What are the most common causes for this?

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Not having a no argument constructor when one trying to be called?

    Stuff like this..

    Code:
    something instanceOfSomething;
    Will try to call the default constructor.

    Post the code around the error and I can probably figure it out.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Shadow12345
    Guest
    I am no longer getting an error

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. default constructor
    By rahulsk1947 in forum C++ Programming
    Replies: 1
    Last Post: 06-10-2009, 01:52 PM
  2. Creating array of objects w/o default constructor
    By QuestionC in forum C++ Programming
    Replies: 19
    Last Post: 05-02-2007, 09:03 PM
  3. template class default constructor problem
    By kocika73 in forum C++ Programming
    Replies: 3
    Last Post: 04-22-2006, 10:42 PM
  4. constructors
    By shrivk in forum C++ Programming
    Replies: 7
    Last Post: 06-24-2005, 10:35 PM
  5. Need help in classes
    By LBY in forum C++ Programming
    Replies: 11
    Last Post: 11-26-2004, 04:50 AM

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