UNIX/Linux Programming - July 2009

by maruf
use of dup2
 
How can i use dup2 command to write the output of execl command to a file named "newfile.txt"?? # i am using sed command inside execl
[1 reply] : Before you fork, create a new file descriptor via open() to newfile.tx... (by jsmith)
how to find deadlock scenario using gdb
 
Hi, My application is running smoothly when I debug with breakpoints, but getting blocked at some point while executing, I am expecting the problem might be du...
[1 reply] : When the program deadlocks, attach the debugger to the running process... (by jsmith)
by vijkrr
What is the equal data type for FIXED DEC in PL1 to C++
 
Hi, One of my C++ function is called by PL1, from PL1 they are passing FIXED DEC type as argument. In C++ i want to receive that, can anyone help me in what ...
[no replies]
History of <String.h>
 
Hi - can anyone provide a brief history lesson? In 1997 (!) I was using a 'String' class, with methods such as after() and at(), which also bundled a RegEx c...
[2 replies] Last: Thanks Duoas, THat was very useful. I hadn't realized the role libg... (by durcott)
cin problem
 
Sorry to bother you with this, but sometimes when I do cin >> nbr; following a previous cin >> operation, the cin fails. It doesn't read anything and just ski...
[4 replies] Last: The number in parentheses is the number of posts that he has, it's no... (by QWERTYman)
killing processes
 
Hello everyone. I Have a question. I need to kill process, from my program, knowing it's pid. How can i do that? I've read that i need to get Handle from th...
[3 replies] Last: yeah, very useful link for me. Thanks (by alexprg1920)
Error messages
 
Is there a website to go to that will explain what an error message means, in genral? here is an exapmle of an error message that i do not understand: error...
[2 replies] Last: im using Eclipse CDT. im not sure where that is. (by joe3dge)
gtk events wndproc
 
when making windows applications uusing winapi, inorder to handle events, you use the LRESULT CALLBACK winproc(HWND Handle, UINT Message, WPARAM WParam, LPAR...
[no replies]
Size of Buffer in recvfrom in Solaris vs Linux
 
I have a C program that reads custom icmp packets off a socket. The program has been used for years on Solaris, but I am now having to port it to Linux. Got...
[11 replies] Last: I checked out the link, but I don't see much of any difference in recv... (by SeytmourButts)
by macla
How to change thread Priority
 
Hi How to change thread Priority in linux.
[1 reply] : I don't believe a POSIX-compliant threads package allows for individua... (by jsmith)
How can I parse a single character from a unicode text file?
 
I'm trying to write a program to re-write a Chinese dictionary into a form I can use with another program. I'm trying to write a program that will parse the da...
[3 replies] Last: Woo. After carefully reading the wikipedia article, I realized what y... (by Impacatus)
GCC 4.4.1, C++0x and unique_ptr
 
Hello! I'm playing with C++0x features introduced in GCC 4.4 for a while. I found interesting behavior (maybe bug?). I'd like to know your opinio, before I d...
[2 replies] Last: Both declarations template<> friend class std::unique_ptr<AAA>; ... (by goofacz)
by vijkrr
use of pragma pack!! Urgent..
 
hi, what is the use if pragma pack in c++. what is the difference in giving the pragma pack(1) and if it is not defined? eg: in my code if i declare pra...
[1 reply] : Packing concerns the binary layout of a struct or class. The items ar... (by kbw)
Print unicode string on console using wcout
 
Hi, I am facing issues in char to wchar_t conversion when I use japanese text. Please look at following code and met me know where I am doing mistake. #in...
[2 replies] Last: Printing text in UTF-8, as in Disch's example, should work as long as ... (by helios)
What's compile error : 'isFile' undeclared
 
I type below, but I didn't success to compile becuase it had error "isFile" undeclared. Why not? #include <dirent.h> DIR *Dir struct dirent *DirEntry; ...
[2 replies] Last: Doing that is not recommended. Use stat () to learn whether or not a... (by Duthomhas)
memcpy anomaly
 
the memcpy function only works of i have WCHAR var1 ; WCHAR var2 ; after it. this makes no sense because statements should never have an effect on previo...
[4 replies] Last: Rant removed. Post your code. (by Duthomhas)
What's mean message ??
 
What's mean this message?? "g++ : compilation of header file requested." Plz....
[2 replies] Last: I solved my problem. Thank you!! Have a Happy weekend. (by baramvi)
array of pointers to a class in a class
 
I have a issue that compiles with a void pointer in vs90 but fails to compile with g++. The first class opens and reads binary files parsing the data. T...
[3 replies] Last: Thanks for the reply, it opens reads the file and then closes it. Its... (by the4bidn)
by vijkrr
How to Debug a C++ program
 
Hi all, I've written a multi threaded application in C++, i dont know how to debug that. If it is a single threaded application, I use dbx to debug succes...
[no replies]
by cdhdds
Why does last line fail?
 
The routine below fails on the last line. It ran fine on an 8 bit machine some years ago and the lines were actually in a for statement. The last line bombs i...
[4 replies] Last: When you create a pointer, it allocates just enough memory to handle t... (by closed account S6k9GNh0)
July 2009 Pages: 123
  Archived months: [jun2009] [aug2009]

This is an archived page. To post a new message, go to the current page.