I have to make a program where you give the input as a parameter of main (you start the program from cmd) and one of the parameters has to be a 128 bit number written in hex. Then in the program I operate on bytes. And so my question is: how do I implement that? What kind of variable should I use and how do I ask for parameters which have to be given in console? I guess it's just my lack of knowledge about the syntax, I will be very grateful for help
Thanks a lot :) So then I have a string argument which is a very big number and I have to cut it to make bytes. Btw later I have to write these bytes in a 2-dimensional array 4x4, maybe I should somehow do it straightly just when I'm 'taking' the parameters into the program? Is it possible to write them directly like this? Any idea how to do it, anyone?
Thank you both but now I actually know more exactly what I need. I get a string argument in a function like e.g. 00112233445566778899aabbccddeeff and need to make an unsigned char array of it which looks like this:
Yup, I am writing in C++ but I don't think I have to convert it to binary? I tried using strcpy, but I know I can't use hex with it and I have no idea how to do it another way.