lundi 25 avril 2016

how to assign command line variables to char in c++

I want to read a string and parse it in C++ to convert it to char from command line.

example:

sample.exe "Username" "Password"

and i want to assign the argv[1] and argv[2] to some char value like below

char buffer[MAX_BUF_LEN] = argv[1];

Help me on this

Aucun commentaire:

Enregistrer un commentaire