array-initialize Questions

27

Solved

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value. I could swear I once knew a simple way to do this. I could use memset() in my ca...
Reams asked 14/10, 2008 at 13:13

3

Solved

In C you can easily initialize an array using the curly braces syntax, if I remember correctly: int* a = new int[] { 1, 2, 3, 4 }; How can you do the same in Fortran for two-dimensional arrays w...
Mcglone asked 14/9, 2010 at 11:12

7

Solved

I want to initialise an array like this - Const MyArray : Array[0..0] Of TGUID = (IInterface); But it results in - [DCC Error] Test.pas(10): E2010 Incompatible types: 'TGUID' and 'string' So ...
Adim asked 1/4, 2009 at 7:7

6

Solved

public class Sample { static int count = 0; public int abc; public Sample() { abc = ++Sample.count; } } I want to create an array of above class, and want each element in the array to be in...
Harbison asked 29/1, 2011 at 21:15

9

Solved

I am still new to C# and I've been struggling with various issues on arrays. I've got an array of metadata objects (name value pairs) and I would like to know how to create only the number of "Inpu...
Edana asked 25/3, 2009 at 19:27

10

Solved

I have the following class in C++: class a { const int b[2]; // other stuff follows // and here's the constructor a(void); } The question is, how do I initialize b in the initialization lis...
Unicameral asked 2/10, 2008 at 11:23

6

Solved

I have a two dimensional array that I need to load data into. I know the width of the data (22 values) but I do not know the height (estimated around 4000 records, but variable). I have it declare...
Transpacific asked 8/9, 2008 at 20:9
1

© 2022 - 2024 — McMap. All rights reserved.