Hi knh,
I thought a TUN/TAP was a virtual ethernet interface driver. So in my basic understanding, a TUN/TAP, instead of receiving packets from a physical
media, receives them from user space...
Type: Posts; User: wyliek
Hi knh,
I thought a TUN/TAP was a virtual ethernet interface driver. So in my basic understanding, a TUN/TAP, instead of receiving packets from a physical
media, receives them from user space...
Hi Mats,
You are correct. By "external" I mean, non kernel. Provided by a third party. Our customer does not want to use the linux stack. They have implemented their own stack that they want us to...
Hi there,
I have an embedded device running linux which has 2 ethernet interfaces (eth0, eth1).
I need to decouple the linux tcp/ip stack from eth1 so that I can access the drivers for this...
From wikipedia:
"Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous...
Please clarify what you requirements are. What is the largest and smallest number you will need to represent. And what is the precision you need? I see you are an engineering student so you should...
There is no array in your code. An array looks like this:
numbers[index]
Can you elaborate please? What do you mean by array?
It looks like the timestamp struct is un-initialized or has been written to incorrectly. It just seems to be a block of 0x20202020202020
try initializing the values to some other pattern, then...
can you show your code that assigns to the time struct and read back from it?
it should really be
sum/(num1 - num +1)
as you are including the boundary numbers
EDIT: or you could do:
int count = 0;
for (; num<=num1; num++)
I think your problem is that you are using
char *b3_dn;
instead of:
unsigned char *b3_dn;
this means when you do the compare:
I have worked with a few of those. They tend not to last to long unless they move into marketing
thanks for pointing those out
If they choose to cheat it's not my problem. Neither is the bug
edit: Which seems to be that the function will not work for in input of 2. Note that there are at least 2 more bugs on top of this
You should learn to use while, for and do while loops.
You really, really should learn to indent your code properly. I did not even try looking at your code because it is too ugly and difficult to...
so in essence what you are looking for is:
#define MAX 1000
int primeNum(int num)
/* will see if a number between 1 and 1000*/
/* (inclusive) is prime or not */
{
int i, num_root;
First you should read up on how strings are handled in C.
eg:
http://www.cs.cf.ac.uk/Dave/C/node19.html
http://www.exforsys.com/tutorials/c-...ings-in-c.html
once you understand strings then:
...
when you declare:
char selection[2]
selection consists of two bytes. They each could have any value. You should initialize them first before checking:
while (strcmp(selection,"Q")!=0)
There are a multitude of ways to do this. First you should read up on how strings are handled in C.
eg:
http://www.cs.cf.ac.uk/Dave/C/node19.html...
Thanks for the info. So heres the revised example which contains both the c method and the c++ file stream method:
#define USE_STREAMS
enum sex {male, female};
struct data
{
char...
This will work. I don't know how to do it using c++ streams though. You have to open the file in binary mode and read a chunk of data the size of your structure. If you pass fread() a pointer to your...