-2

I'm trying to get the output of zenity -entry into a C language variable. So far i can only think of using system and i still have no luck.

CVar=system("$(zenity --entry --title='TITLE' --text='TEXT')");

what i'm trying to do is get the value of user input from zenity entry and assign it to CVar. Any help ?

1 Answers1

1

The system() function returns the status code of the command you executed, not its output. On POSIX-like operating systems, you can use the popen() function to execute an external command, receiving what it prints out.

fuz
  • 88,405
  • 25
  • 200
  • 352