October 05, 2011 object.Error: Access Violation | ||||
|---|---|---|---|---|
| ||||
Hello, I have this code:
import std.stdio;
class TTest
{
public void Info(T)(string name)
{
writeln(typeid(T), "\t", name);
}
}
void main()
{
TTest test;
test.Info!(uint)("one");
}
When compiling no errors. But when I try to run a program there is an error:
object.Error: Access Violation
----------------
426348
4261BF
402023
404C5B
404857
455789
----------------
| ||||
October 05, 2011 Re: object.Error: Access Violation | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Мартыненко А.А. | On Wed, 05 Oct 2011 09:49:04 +0900, Мартыненко А.А. wrote: > Hello, I have this code: > > import std.stdio; > class TTest > { > public void Info(T)(string name) > { > writeln(typeid(T), "\t", name); > } > } > void main() > { > TTest test; test is null. This works: auto test = new TTest(); > test.Info!(uint)("one"); > } > > When compiling no errors. But when I try to run a program there is an error: object.Error: Access Violation > ---------------- > 426348 > 4261BF > 402023 > 404C5B > 404857 > 455789 > ---------------- Ali | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply