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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. global dynamic array.

global dynamic array.

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++data-structures
5 Posts 5 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.
  • P Offline
    P Offline
    priyank_ldce
    wrote on last edited by
    #1

    Hi all, I am making one win32 application using VC++.NET. I have one global array of char defined as char * picArray; And it is initialized in one of the function of application picArray = new char[Height*Width]; But when I am trying to use this array in another function I am not getting data values. Can I know what is the solution for this? Thanks in advance, Priyank.

    L C P V 4 Replies Last reply
    0
    • P priyank_ldce

      Hi all, I am making one win32 application using VC++.NET. I have one global array of char defined as char * picArray; And it is initialized in one of the function of application picArray = new char[Height*Width]; But when I am trying to use this array in another function I am not getting data values. Can I know what is the solution for this? Thanks in advance, Priyank.

      L Offline
      L Offline
      Like2Byte
      wrote on last edited by
      #2

      Have you tried the Scope Resolution Operator '::'?

      1 Reply Last reply
      0
      • P priyank_ldce

        Hi all, I am making one win32 application using VC++.NET. I have one global array of char defined as char * picArray; And it is initialized in one of the function of application picArray = new char[Height*Width]; But when I am trying to use this array in another function I am not getting data values. Can I know what is the solution for this? Thanks in advance, Priyank.

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        priyank_ldce wrote:

        But when I am trying to use this array in another function I am not getting data values

        If you don't fill the array with values, it's logical that you cannot get data value. Can you explain exactly what you are doing, what the problem is and what you expect ?


        Cédric Moonen Software developer
        Charting control [v1.1]

        1 Reply Last reply
        0
        • P priyank_ldce

          Hi all, I am making one win32 application using VC++.NET. I have one global array of char defined as char * picArray; And it is initialized in one of the function of application picArray = new char[Height*Width]; But when I am trying to use this array in another function I am not getting data values. Can I know what is the solution for this? Thanks in advance, Priyank.

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          priyank_ldce wrote:

          picArray = new char[Height*Width];

          Are you its assigned value somewhere in your application, bfore using it ?

          Prasad Notifier using ATL | Operator new[],delete[][^]

          1 Reply Last reply
          0
          • P priyank_ldce

            Hi all, I am making one win32 application using VC++.NET. I have one global array of char defined as char * picArray; And it is initialized in one of the function of application picArray = new char[Height*Width]; But when I am trying to use this array in another function I am not getting data values. Can I know what is the solution for this? Thanks in advance, Priyank.

            V Offline
            V Offline
            vibindia
            wrote on last edited by
            #5

            hi Is ur another function where u r getting the value is defined in same file ,where u are declaring the char *picArray as global. The more globas u use,will create more problem when the application grows big. So pls make try to avoid it

            VIBIN "Fool's run away,where angle's fear to tread"

            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