Like Tree1Likes

multiple attributes in arrays

This is a discussion on multiple attributes in arrays within the C++ Programming forums, part of the General Programming Boards category; thx ALOT for that, great info =) never heared of copy constructors & assignment operators, will look into it...

  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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    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.

Page 2 of 2 FirstFirst 12
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, 05:34 AM
  5. Parallel Arrays with Multiple Arrays
    By Billye Scott in forum C++ Programming
    Replies: 0
    Last Post: 03-02-2002, 10:14 PM

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