|Related to : Heap-like data structure with fast random access?|
|How to access to other fields by refering data structure name|
According to your comment, you want to store error descriptions in
multiple languages. Do not embed your human-readable strings within
your program code, instead use Resource files. I will not explain how
to use them, instead I'll refer you to search online for ".net
resources localization" to find plenty of articles and tutorials.
Create a resource file for each language (give it an appropriate
|generate random alphanumeric key in Ms. Access|
Drop this into a module and run it. You should get what you need.
Dim s As String * 7 'fixed length string with 7 characters
Dim n As Integer
Dim ch As Integer 'the character
For n = 1 To Len(s) 'don't hardcode the length twice
ch = Rnd() * 127 'This could be more efficient.
'48 is '0', 57 is '9', 65 is 'A', 90 is 'Z', 97 is 'a',
|No random access method for Java Set|
> boolean contains(Object o)
Returns true if this set contains the specified element.
|Enable random access to collection with MongoDB|
Based on similar questions, I've come to the conclusion that having a
random field is a valid solution if the collection is dynamic, meaning
that documents are inserted frequently. The more dynamic the
collection is, the more 'random' access you can have.
|access violation assigning a structure's element with a character pointed by a pointer|
strcpy(myInfo->id, *tmp); is definitely wrong, myInfo->id =
*tmp; should work (as long as tmp is char* type) unless either myInfo
or tmp point at bad info. There's not quite enough code here to be
sure, but my guess would be that myInfo is not initialized properly.
Maybe it is NULL.
It might help to run the program in a debugger (you can compile with
-g if using gcc to get better info`) to