CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Building Interactive UIs with ASP.NET Ajax: Rebinding Client-Side Events After a Partial Page Postback
  • Speed Up Repetitive Insert, Update, and Delete Query Statements
  • Binding Data to Silverlight 4.0 Controls Using ASP.NET MVC Framework 2.0
  • ADO.NET Data Services in the .NET Framework

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Managed C++ and C++/CLI Discuss Managed C++ and .NET-specific questions related to C++.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old May 21st, 2009, 02:01 PM
    Elite Commando Elite Commando is offline
    Member
     
    Join Date: Jan 2009
    Posts: 145
    Elite Commando is an unknown quantity at this point (<10)
    Create global Array in GUI (Windows Forms)

    How do I create a global integer array of size 32 in a Windows Forms application? Thanks!

    Last edited by Elite Commando; May 21st, 2009 at 02:03 PM.
    Reply With Quote
      #2    
    Old May 22nd, 2009, 01:46 AM
    cilu's Avatar
    cilu cilu is offline
    Moderator/Reviewer/MS MVP
    Power Poster
     
    Join Date: Oct 2002
    Location: Timisoara, Romania
    Posts: 13,910
    cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)cilu has a reputation beyond repute (3000+)
    Re: Create global Array in GUI (Windows Forms)

    What do you mean by global? You should avoid global variables.

    You do it just like you do in C++.
    Code:
    int arr[15];
    If you need a managed array there is then array class.
    Code:
    array<int>^ arr = gcnew array<int>;
    __________________
    Marius Bancila
    Home Page | Blog
    My CodeGuru articles

    My latest articles: Visual Studio 2010 series: VC++, C++ compiler, MFC

    Try my VSBuildStatus add-in for Visual Studio 2005, 2008 & 2010 (v1.2.0).
    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

    Please answer my multi-core and concurrency questionnaire.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:24 AM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.