Thread: multiple attributes in arrays

  1. #16
    Registered User
    Join Date
    Nov 2012
    Posts
    38
    thx ALOT for that, great info =)

    never heared of copy constructors & assignment operators, will look into it

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    First off, using "struct" before the type of a struct is an archaic rule from C. You don't need to do it. Simply typing "hashstruct" or "dataset" is enough.

    Now:
    unsigned int mysize = 500;
    myhash = new hashstruct[mysize];
    Prefer not to use new here. In case you need a dynamic array (ie, whose size is set at runtime), then prefer to use std::vector.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Setting up a Class to hold Objects with multiple attributes
    By IPthereforIam in forum C++ Programming
    Replies: 4
    Last Post: 04-11-2012, 10:50 AM
  2. Searching Multiple Arrays?
    By Cell in forum C Programming
    Replies: 3
    Last Post: 03-19-2009, 03:45 PM
  3. classs with multiple arrays
    By shuo in forum C++ Programming
    Replies: 5
    Last Post: 05-06-2007, 08:31 PM
  4. Replies: 2
    Last Post: 02-23-2004, 06:34 AM
  5. Parallel Arrays with Multiple Arrays
    By Billye Scott in forum C++ Programming
    Replies: 0
    Last Post: 03-02-2002, 11:14 PM