Originally Posted by Sebastiani
my project is to build an assembler for a mips program i wrote
i have this map in my main function:
that as it loops through this while code, it saves the address of labels in the map as they [the labels] come up.
string printCode(string, string&)
map <string, int> labList;
i have an idea that involves passing in the map labList into the printCode function (which finds the binary of each line in mips). to get printCode to properly make branch functions, it needs a list of labels and their addresses, hence the map.
i tried prototyping a fuction like
but it throws an error with map as a parameter.
void function (string, map);
thus my question is: Can i pass std maps as parameters to functions, kinda like passing a pointer to an array