Connecting Tech Pros Worldwide Forums | Help | Site Map

new question

Robert Smith
Guest
 
Posts: n/a
#1: Jul 22 '05
in a c++ program i want to run the command uuidgen and get its value and
store it in a string varible so i can use it later.
How can i do this?
I am running redhat 9
thanks



Victor Bazarov
Guest
 
Posts: n/a
#2: Jul 22 '05

re: new question


"Robert Smith" <none@none.com> wrote...[color=blue]
> in a c++ program i want to run the command uuidgen and get its value and
> store it in a string varible so i can use it later.
> How can i do this?
> I am running redhat 9[/color]

There is no such thing as 'uuidgen' in standard C++, the subject
of this newsgroup. Perhaps you will find more information on this
if you visited comp.os.linux.development.apps (or something like
that) if you expect the newsgroup to know what 'uuidgen' is.

In general, if you have a function that returns a string (like, say,
std::strcat, for example), then you can call it with appropriate
arguments and get the string back and store it for later use. Since
'uuidgen' is not a standard function, nothing can be said about it.

V


Anil Mamede
Guest
 
Posts: n/a
#3: Jul 22 '05

re: new question


You want get the string printed to the shell produced by uuidgen? I'm
not experienced with this situation but i can give you an ideia, try to
pipe out the output of the file to input. Something like
[color=blue]
> system("uuidgen 1>&2"); and then call cin >> some_string; to get the[/color]
input



Robert Smith wrote:
[color=blue]
> in a c++ program i want to run the command uuidgen and get its value and
> store it in a string varible so i can use it later.
> How can i do this?
> I am running redhat 9
> thanks
>
>[/color]
Closed Thread