Thanks for the reply. No I am not confused :). I have already done setting up the IPs as static but still my server-client programs could not talk to each other.... One solution is that I need to...
Type: Posts; User: odysseus.lost
Thanks for the reply. No I am not confused :). I have already done setting up the IPs as static but still my server-client programs could not talk to each other.... One solution is that I need to...
Hello,
I want to have a server-client communication between two PCs using wifi. So far I can do that by using an intermediate router with DHCP using TCP/IP programing. What I would like is to take...
C Programming: A modern approach by K.N. King
An excellent and easy to understand introduction to intermediate level of C. I ve been using it since my Bachelors whenever I want to have a clear...
Thanks a lot guys.... Your links and the tip that it is basically socket programming is a very very big relief.... Bob also thanks for your link to the windows wlan api. It can be probably helpful on...
Hi,
I want to implement a c/c++ program that allows communication between two pcs through their wifi cards. The way I am thinking of is having the same program running on the two pcs (or have...
Thanks a lot. Both for the answer and for reminding me the man pages.
A very quick question. I need to scan and store the second value in a file but I am forgetting the syntax of fscanf. Let me illustrate it with an example.
A file has one line, the following:
1,...
This works just fine. Cheers.
Hi,
how can I pass an object as an argument to a function. My knowledge of C++ is NULL but I do cope well with C so please accept my apologies if my question is rubbish. Basically here is my...
Thanks everybody. You have been most helpful.
Hi,
sorry for such a trivial question.... What is it better to include the header files in the header file or in the main program (probably bearing in mind that the .h file is not dependent on the...
Good... but then you do not use WNOHANG anymore and subsequently you suspend the execution of the parent program until any single child process terminates (or with the for loop, until all children...
Thanks guys. But both answers are restricted to the operating system and secondly it assumes firefox is installed.... What I would like is something like what you see in many programs when you click...
Absolutely nowhere. In fact it does not even wait a zombie process, it returns and frees the resources used by the children process. Furthermore, it waits as long as one/any process is terminated....
Hi. How would I launch the default html browser from my program under both windows and linux?
Cheers.
Not really. wait() will wait until one process exits and will clean all the zombie ones. However, the WNOHANG means that it will not hang the program to this statement. This is done by that if there...
Or write your own function by using fgetc() which is reading character by character.
What have you exactly changed?? It seems to me you are starting to learn c language as well. char and float are reserved keywords of the language.
Try something like
#include <stdio.h>...
Hello,
I will try to be as clear as possible. I am developing an application under linux using gtk. There are different gtk programs that can be run standalone. But I want another program to...
In linux use a terminal as root and type:
ifconfig
if it fails try
/sbin/ifconfig
Your IP address is after the inet addr
Had the same problem and the above code also works for me. Using
g++ (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
extern StructureName variableName may declare that there is a variable of StructureName...
Thanks, that works just fine.
Hi,
I have the following statement to my code:
sscanf(line, "%[^=\n]=%[^\n]", tag, value);
which if I understand well it means scanf any character till a newline or an = character is...
so basically you mean:
Use fgets() to read a line into a buffer
Use strlen() to work out the length
Use malloc() to allocate enough space for that line
Use strcpy() to copy from the buffer to the...
Hi i have a chicken and egg problem. I want to read a file line by line into a char *, let's say str. In order to malloc str I need to know the length of the line which I cannot have unless I read...