Thanks for the help. The base class of my functor is non-templated, but the nature of the code won't let me setup a default constructor to solve this problem (like you suspected), so I think I'll go...
Type: Posts; User: registering
Thanks for the help. The base class of my functor is non-templated, but the nature of the code won't let me setup a default constructor to solve this problem (like you suspected), so I think I'll go...
I don't know if this is even possible, but can you set a default function pointer in a function's calling signature, like
you can for passing ints or floats, so one doesn't need to be passed all the...
wow, that's a handy trick. :) Thanks! It is weird that it's stored under a redhat directory, but that certainly answered my question.
Hi all,
I have a 32-bit processor, and I believe floats are generally given 23 bits for the mantissa, but I want to know for sure. However I'm running Red Hat Linux 9.0, which has no float.h that I...
hk_mp5kpw> Thanks!! That fixed it!
CornedBee> Thanks for the tip. I tried different syntax for the to_string method. The book I'm using suggests
flags.template to_string<char>()
however...
Hi all,
I'm trying to read-in some binary data from a file, into a bitset. I was doing this:
bitset<FLAG_SIZE> flags;
file.read((char *) &flags, FLAG_SIZE);
but found my stack was...
Oops....thanks. :)
Okay, rather than make it static what I tried to do is make a global pointer to my object, then a global function that could be used as the wrapper to the callback. However that's not working either...
Hi all,
I'm trying to call a non-static method when SIGALRM is received. Since it's non-static I can't just call the method, I need to qualify it. However then it's not a void* it's a void (class*)....
Just to resolve the thread in case anyone reads it in the future, I did find the problem, and it was an array index violation.
I was doing something like
char *data = new char [size];
then...
Sorry for the late feedback. After much packet sniffing I found our domain name (www.nerrenvirons.org) was having its internal LAN IP address published during the connect() failures, and its public...
Learning the basics to sockets programming isn't too hard. I HIGHLY recommend the book "TCP/IP sockets in C" isbn 1-55860-826-5: only 130 pages it gives great explanations, very concise and to the...
Thanks for the great feedback. I'll go back and review all my code -- I was concentrating only on where the crash occured. I'll let you know what I find. :)
Wow great work, thanks for the confirmation. :) That's the thing, the connect() will work great for about 4 hours, then for 6-8 hours connect() times-out forever. Then the cycle repeats. Even...
Hi all,
I've got an application that SIGSEGV a lot, and it always does so when I'm doing += with a string object. Now I've run "top" while my programming is running, and I don't see "free mem" run...
Well see that's the thing, development only took place on systems A and B. This is the first time I loaded anything onto C, because C is a customer beta testing site. Unfortunately I have no idea how...
Hi all,
I have a fairly simple server running on system A with several clients running on systems B (inside LAN) and C (outside LAN). Now the client on system C was running great for hours making...
I second the motion for mySQL: great, fast and commonly used so there're lots of docs on it.
Oops, my bad. :) I was doing
delete [] host;
in the actual executable. I had changed it to
delete host[i];
and remade it but never loaded the new executable, so I was executing old code when...
'i' is 0 when the SIGSEGV occurs.
MAX_HOSTS_PER_SERVER is 50
numberOfHosts == 1 at that point. There is 1 host, so that number is correct.
The code is too much to post, since RemoraHost has an...
Hi All,
I've got a class that declares an array of pointers like this:
class RemoraServer : public CommonApplication
{
Howdy,
I am wondering what is a better approach to check whether or not stream operations succeeded:
Check exceptions:
file.exceptions(ios_base::eofbit||ios_base::failbit);
try
Thanks! Your link explained everything, it works fine now.
Now I keep getting HTTP errors since I assume I'm not building my HTTP request headers properly. Know of any beginner's links to HTTP?...
Hi all,
What would lead connect() to fail and return "Network unreachable"? What I'm trying to do is send a brief msg through port 80 to www.nerrenvirons.org from inside my firewall. I can websurf...
Thanks for the great feedback. I'll give your suggestions a try and see if I can improve my code.