Thanks. I will probably use some kind of encoding to format each object, but I am still concerned that more than one object will read/write at a time.
There should be some way to signal the buffer...
Type: Posts; User: Joe Monti
Thanks. I will probably use some kind of encoding to format each object, but I am still concerned that more than one object will read/write at a time.
There should be some way to signal the buffer...
I'm writing a C++ app that uses sockets and I have no problem sending an recieving, but am having trouble separating the differnt types of messages i'm sending.
I have several classes from which I...
That really helps. Thanks!
Basically the problem I am running into is how do I send type information? and how do I use that type information to create the correct object when reading?
Here's some psudo-ish C++-ish Java-ish code. It is the basic jist of how I would like things to work. The idea is to make creating and handling different types of data to be sent over the network as...
I run an open source project that was started in Java, but for performance considerations I am re-writing in C++. With Java it was easy to implement an object-oriented client-server communication...
Thank you so much!
It took me a while to figure out what exactly was going on, but I was able to mess around with it to get it working with my setup. That really helped me get back into C++ mode....
I tried some ideas from that thread and I think I ran into the real problem: Sending C++ member function to C library function
Any ideas?
Thanks, I'll take a look at that and see what I can do.
Also, can I just not bother sending the run function to start and just acess the sub-class implementation of run from the start...
I have a C++ member function that I need to send to a C library function, but it keeps yelling at me :(
Here's what I do:
pthread_create(&pthread_id, NULL, this->*_run, NULL);
Here' s what...
Yeah .... It compiles and runs without error. I will just disregard the warning.
Thank you! :)
This is what it looks like now
#define THE_PATH "/path/tosomething"
#define CAT(a,b) a ## b
some_function (CAT (THE_PATH, "/image.png"));
but I get this warning,
warning: pasting...
I'm using automake/autoconf with no special configure or make options.
I think -Wall or -Wtraditional will show the warning.
But my main concern is that older versions of GCC (2.x) will not...
I dont want to do strcat because I want it to be concatentated at build time (which i dont think my example does) for performance considerations
It's also a really good idea to check for '\0' just in case. But it depends on how certain it will have the ' ' or '"'
I have some code as such
#define THE_PATH "/path/to/somthing"
// later on down I do this
some_function (THE_PATH "/image.png");
This is a decent sized app and THE_PATH is something that I...
EUREKA!!!!
I found the problem. Malloc can get confused when malloced memory has buffer overflow. I sifted through all my mallocing and found a stupid error. Instead of malloc (strlen (my_string)...
Yeah, I've tried flushing the stream after the printf()'s.
When I stepped through with a debugger the malloc() line is where it hangs.
I've inspected the os_list_put() function and it looks...
Yeah, i'm sure its malloc. I've put printf's before and after the malloc function and it hangs before printing the second printf, it is able to complete the malloc on the first insert, but successive...
I've got a strange C problem that I've never seen before and can't figure out why its happening.
I'm writing a GTK app and I keep a linked list of data which is graphically represented as a CList....