problem with arrays in WinApi
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: problem with arrays in WinApi

Threaded View

  1. #1
    Join Date
    Mar 2014
    Posts
    13

    problem with arrays in WinApi

    Hello.
    I'm new to winapi but I've read a book about it already. The problem is that my Visual Studio 2012 considers some of the stuff mentioned in my book as an error. For example:
    Code:
    Array^ arr = Array::CreateInstance(System::Int32::typeid, 10);
    doesnt work.It asks me to put a semicolon between 'Array^' and 'arr',which also results in an error ofc.Also it says stuff like "Array must be a class or a namespace when followed by '::' ",CreateInstance is not a member of global namespace" and a ton of other issues.What's more:
    Code:
    array<int>^ arr = { 0, 1, 2 };
    doesn't work as well. it says that " array is not a template ".Furthermore it seems to be completly unfamiliar with the gcnew operator:"error operator gcnew is unidentified".It makes me tired already

    Additional question:
    I want to make an array of objects of my own class.How can i make a definition of such an array without initializing it's components?

    Thanks in advance; may the Compiler be with You.
    Last edited by Fides Facit Fortis; March 5th, 2014 at 12:06 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center