im new to passing parameters through the command line
im trying do do this in C
passing ./a.out test.mc 4 2 1
i want
blockSizeInWords == 4
numberOfSets == 2
blocksPerSet == 1
and argv[0] == "test.mc"
but i have now clue what im going wrong
im trying do do this in C
Code:
int main(int argc, char *argv[])
{
blockSizeInWords = (int)argv[2];
numberOfSets = (int)argv[3];
blocksPerSet = (int)argv[4];
passing ./a.out test.mc 4 2 1
i want
blockSizeInWords == 4
numberOfSets == 2
blocksPerSet == 1
and argv[0] == "test.mc"
but i have now clue what im going wrong