Re: Access Violation when accessing Dynamic Array

2016-01-03 Thread tsbockman via Digitalmars-d-learn
On Sunday, 3 January 2016 at 03:41:12 UTC, Jack wrote: I didn't actually knew it works that way because last time I tried using '==' directly it won't compare. Well, there are always many ways that things can go wrong (including compiler bugs), but it SHOULD work, so ask on the forums if it d

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread Jack via Digitalmars-d-learn
On Saturday, 2 January 2016 at 18:14:24 UTC, tsbockman wrote: On Saturday, 2 January 2016 at 17:39:42 UTC, Jack wrote: So I'll just send the whole file if you don't mind: http://dpaste.com/11V5BYA (Line 174-183) The contents of the .txt file is : http://dpaste.com/3FVW5QR I didn't put a lot

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread tsbockman via Digitalmars-d-learn
On Saturday, 2 January 2016 at 17:39:42 UTC, Jack wrote: So I'll just send the whole file if you don't mind: http://dpaste.com/11V5BYA (Line 174-183) The contents of the .txt file is : http://dpaste.com/3FVW5QR I didn't put a lot of effort into trying to actually understand what you're doing

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread Jack via Digitalmars-d-learn
On Saturday, 2 January 2016 at 17:56:12 UTC, tsbockman wrote: On Saturday, 2 January 2016 at 17:39:42 UTC, Jack wrote: [...] By far the most likely explanation for an exception at that location, would be if `custom_keyword` really didn't contain a valid key into the `custom` associative arra

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread tsbockman via Digitalmars-d-learn
On Saturday, 2 January 2016 at 17:39:42 UTC, Jack wrote: So I'll just send the whole file if you don't mind: http://dpaste.com/11V5BYA (Line 174-183) The contents of the .txt file is : http://dpaste.com/3FVW5QR I just checked it and it compiles but it does that strange Access Violation error.

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread Jack via Digitalmars-d-learn
On Saturday, 2 January 2016 at 17:15:53 UTC, tsbockman wrote: On Saturday, 2 January 2016 at 16:48:41 UTC, Jack wrote: [...] Also, your sample reads from an external file, "read.txt". Either give us the contents of that file, or change the sample so that it is not required. Woops, sorry ab

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread tsbockman via Digitalmars-d-learn
On Saturday, 2 January 2016 at 16:48:41 UTC, Jack wrote: [...] Also, your sample reads from an external file, "read.txt". Either give us the contents of that file, or change the sample so that it is not required.

Re: Access Violation when accessing Dynamic Array

2016-01-02 Thread tsbockman via Digitalmars-d-learn
On Saturday, 2 January 2016 at 16:48:41 UTC, Jack wrote: So yeah I've been trying to experiment with the language when I'm met with an Access Violation error. So I've extracted a string from a file and used it as an index for a dynamic array. Stripped code sample is : ///

Access Violation when accessing Dynamic Array

2016-01-02 Thread Jack via Digitalmars-d-learn
So yeah I've been trying to experiment with the language when I'm met with an Access Violation error. So I've extracted a string from a file and used it as an index for a dynamic array. Stripped code sample is : / void foo() { string[string] custom; string keyword