To know the line which is causing error, use GDB. it's availabe on www.sunfreeware.com. After downloading and running gdb in the same dir. in which ur file exists,
u'll get a gdb prompt.
give the following commands:
gdb> file filename
gdb> run
gdb> backtrace
these series of commands shall show...
declare a char pointer
char *command="dir/b c:\directory>a.txt";
ststem(command);
the system command runs the commands that run on DOS prompt. the redirection operator redirects the o/p to the file a.txt. dir/b lists all files in a dir without any description.
include stdlib.h or...
The first char of the name of the string that describes message Q should be a '/' so u shud write it as "/myque" and any other char. in the string cannot be a '/'.
Also see the man page on mq_open to ge more information.
Regards
Nam
DECLARE A CHAR POINTER AS:
char *command = "dir/b c:\\files >a.txt";
system(command);
here dir/b is a DOS command to list all files in a dir without description!
"files" is the directory which needs to be read
and "a.txt" is the file in which the output i.e. the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.