Last Minute Reviewing

This is a discussion on Last Minute Reviewing within the C++ Programming forums, part of the General Programming Boards category; In that way? Yes. The [4] isn't strictly necessary... You can write objects[] too, but you can't omit it....

  1. #16
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,173
    In that way? Yes.
    The [4] isn't strictly necessary... You can write objects[] too, but you can't omit it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  2. #17
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,527
    Quote Originally Posted by jw232 View Post
    Code:
    ExampleClass objects[4] = {1,2,3,4};
    Is initializing objects in that array only possible because the constructor only takes one argument? Is the [4] necessary?
    That and the constructor that takes one argument isn't labelled explicit. In such a case, initializing an array of objects won't compile.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wait just a minute here!!!
    By Kennedy in forum C Programming
    Replies: 7
    Last Post: 04-13-2009, 09:36 AM
  2. Printing System time and 30 minute alarm
    By kevndale79 in forum C Programming
    Replies: 16
    Last Post: 10-17-2006, 05:10 AM
  3. Replies: 4
    Last Post: 05-13-2003, 04:54 PM
  4. Replies: 3
    Last Post: 12-16-2002, 08:55 AM

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