This is a very simple question, I'm sure, but I would appreciate help. :)
Here is my variable in the .h file:
map<int, map<int, map<int, CString>*>*> batch;
Here I am trying to assign a value:
((*((*(batch[atoi(transnum)]))[1]))[atoi(*docnum)]) = page;
I added a few extra parentheses, trying to figure this out to make sure that the derefs are being processed in the correct order - unfortunately, it still doesn't work. When I run this line, my application just crashes. I have it wrapped up in try {} catch {}, but an exception does not occur. I don't use C ++ very often, and I wonder if anyone can tell me what I'm doing wrong.
Here are the relationships I'm trying to model:
The list of transaction numbers (integers) must be ordered using the key.
For each transaction number, I have two types of documents, payments and invoices (buckets represented by 0 and then 1 respectively in my data structure above)
Each type of bucket can have one or more documents . These documents must be ordered by id (docid)
Each docid refers to a line consisting of a list of comma-delimited files in the file system for processing.
If you think it's better to use a data structure, I would be interested to hear it.
EDIT: , . , MFC- ++ , - . , , , . , . .