Is this code is correct, I want to allocate memory from the stack..
using System;
using System.Globalization;
public class ABC{
static void Main(string[] args)
{
unsafe
{
char* i = stackalloc[256];
for (int j = 0; j < 256; j++)
i[j] = (char)j;
}
}
}
Loading

VulpesPosted Apr 12, 2011, 4:10 AM
char* i = stackalloc char[256];