UNIX/Linux Programming - May 2010

by EF3
LINK URL LINUX
 
Hi, I will explain my code work in Linux (ubuntu) and c ++ (gcc). I have a code with sockets which makes the function of client-server and I wonder if you can...
[1 reply] : I'm not sure I completely understand you. But I think you want to pass... (by Galik)
operating sever client from same program
 
i want to make a single program for operating both server & client. i want my program to run in such a way that when program is launched, server should start li...
[3 replies] Last: I don't think that it would be possible for server to "quit". Having s... (by kevinchkin)
Segmentation fault error
 
Hi,i'm trying to list all folders in "Downloads" directory including subfolders. Here is my code,it shows me "Segmentation fault" error when i run it: ve...
[8 replies] Last: Oh,yeah,fixed that now,thanks everyone ;) (by igorpan)
some roadmap for beginner
 
can you suggest me what material to refer to in order to study systems programming under UNIX/Linux. ( C/C++ ) also what approach to follow for the same ? h...
[3 replies] Last: Practical UNIX Programming: A Guide to Concurrency, Communication, and... (by closed account z05DSL3A)
problem with uint32_t variables
 
i have declared a variable as uint32_t num; when i take input for this variable i.e cin>>num; cout<<num<<endl; & take its cout, then it gives problem. w...
[2 replies] Last: You need to use the hex manipulator (#include <iomanip>) to do I/O w... (by Duthomhas)
problem with extern variable
 
i have got 2 cpp files & a header file, which i have included in all 2 cpp files. its like this abc.h extern uint32_t key; a.cpp #include "abc.h"...
[5 replies] Last: Ok. So you are trying to compile to separate executables... Well, th... (by moorecm)
Semaphores
 
I wanted to a model where many processes trying to access an array. So, I was thinking of making this array in shared memory and then using a semaphore to incor...
[6 replies] Last: how is richard stevens for beginners ... any other book that would be... (by sudhir2010)
can someone improve it (chess game)
 
I've got almost all of my code busted out, but one of my queens doesn't show up (still interacts with the board, kind of), and i get a random 'X' floating aroun...
[6 replies] Last: void initBoard(char** board, int w, int h) { for(int i(0); i ... (by Denis)
add user to router
 
Dear friends, i decide to develop an ISP billing system. i have a linux server that communicate with a cisco router. how can i add user and config them wit...
[6 replies] Last: As long as your filter the username for special characters, you should... (by PanGalactic)
reading from a text file
 
I am writing a program in which i will be using 2 functions, one for writing integers into a text file & second for reading them back in integer form. while i d...
[1 reply] : To open a text file for output you can use this: #include <fstre... (by Galik)
C++ const functions and GCC const tttribute
 
http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Function-Attributes.html There's this sentence at the end of the explanation of the const attribute : "This ap...
[1 reply] : What they probably mean is that when you write const int func(int x), ... (by Athar)
server-client : sending uint32_t data using write() function
 
i am making a server-client program in which they are exchanging keys of a hash chain. the keys being generated are in uint32_t, however when i exchange these k...
[2 replies] Last: Why can you not just do this? uint32_t hash; ... uint32_t buffer... (by PanGalactic)
Sending HEX,integers over TCP
 
Hello, I wrote the following program to send commands to a camera over TCP. However so far I have only been able to receive a welcome message from this camera....
[7 replies] Last: Thanks guys, for the input on byte order. It worked! (by nancy1002)
developing user interface
 
Hello everybody, i'm trying to code a program that exec some commands and show the result of those commands... the user interface should be something like this:...
[2 replies] Last: If you don't want a console program, then you'll need a library for GU... (by Albatross)
by mabad
Memory leak when using array of pointers to objects
 
I do not know how to solve this issue. If I use an array of pointers to objects and want to release all the memory used I do not succeed. Here is a simple exam...
[11 replies] Last: Ok, so I am convinced now. The memory is not released until the applic... (by mabad)
by Deluge
sleep() and usleep() Not Working for Me
 
I've been trying to figure out how to get my program to pause for a second or two. I've found sleep() and usleep(), but neither are working as they have been e...
[4 replies] Last: @Deluge I tried what you said and it is right . I used to get co... (by sysabod)
by jhoebz
quick question
 
for a parameter delcaration such as Something(double k = 0) what does the k=0 mean. does it mean that it takes in a double parameter and if no param...
[3 replies] Last: exactly, and that is what the default parameter meant to be (by sysabod)
why my chmod fail all the time
 
i wrote a little program which made use of the chmod system call to change my file permissions.Here is my code. #include <unistd.h> #include <sys/types.h> ...
[4 replies] Last: i finally figured it out. I think it is because of the location of the... (by sysabod)
question on TCP_NODELAY
 
Hello All, I have question on TCP_NODELAY setsockopt in case of server. At what point do we need to set this socket option to take effect?. Is it after calli...
[no replies]
The remove() behavior of container list on MAC
 
// My code is bellowing: class MyClass{ public: MyClass(int key):fKey(key) {} const int GetKey() const { return fKey; } // some other ...
[1 reply] : I think i have got the reason, let's see the source code on Windows fr... (by aidyszh)
May 2010 Pages: 123
  Archived months: [apr2010] [jun2010]

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