What you're trying to do is IPC (Inter Process Communication)
http://en.wikipedia.org/wiki/Inter-p..._communication
Piping would've been the easiest to use if you're developing in a POSIX machine.
Using sockets is your best option. If you don't want to use sockets then I'd suggest that you use a file wherein:
App A -> writes a file containing a command that App B understands
...
User Profile
Collapse
-
Hi thanks for the reply,
I did a similar implementation like you suggested but when I store the value to the unsigned char array it becomes a decimal value. What I wanted to happen is store the value in hex format:
argv[1] = "6391712345 67";
// Get the substring(0,2) and store as hex value
unsigned char x[0] = 0x63;...Leave a comment:
-
Parsing Command Line Argument Problem
Hello Guys,
Here's my first question here ^_^
I'm having a hard time in parsing a command line argument in C++. Let's take for example a msisdn.
# ./foobar 639171234567
I want to be stored in an unsigned character array like this:
unsigned char x[0] = 0x63;
unsigned char x[1] = 0x91;
unsigned char x[2] = 0x71;
.
.
.
The input...
No activity results to display
Show More
Leave a comment: