Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Newbie question about data structures

Newbie question about data structures

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    crs999
    wrote on last edited by
    #1

    What is the best way to access large arrays of numberic values to use in separate class functions? Thanks for any help in advance.

    C S 2 Replies Last reply
    0
    • C crs999

      What is the best way to access large arrays of numberic values to use in separate class functions? Thanks for any help in advance.

      C Offline
      C Offline
      crs999
      wrote on last edited by
      #2

      oops! fat fingered numeric.

      1 Reply Last reply
      0
      • C crs999

        What is the best way to access large arrays of numberic values to use in separate class functions? Thanks for any help in advance.

        S Offline
        S Offline
        Shafiee
        wrote on last edited by
        #3

        Use vectors:

        #include <vector>

        using namespace std;

        vector<int> a;
        a.push(100);
        a.push(200);
        .
        .
        .

        L C 2 Replies Last reply
        0
        • S Shafiee

          Use vectors:

          #include <vector>

          using namespace std;

          vector<int> a;
          a.push(100);
          a.push(200);
          .
          .
          .

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Remembering of course to mention that vectors are part of STL and a good tutorial is at http://www.sgi.com/tech/stl/[^] :) Elaine :rose: The tigress is here :-D

          1 Reply Last reply
          0
          • S Shafiee

            Use vectors:

            #include <vector>

            using namespace std;

            vector<int> a;
            a.push(100);
            a.push(200);
            .
            .
            .

            C Offline
            C Offline
            crs999
            wrote on last edited by
            #5

            thanks for the reply! Where would i locate this code so that it is accessible by all functions within a class?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups