For my flash project I want to read variables from a text file and store them locally in flash variables. This workes fine if I put everything directly inside the flash project file (actions belonging to a certain frame). Because I need to write a lot of code I want to put it all inside an external actionscript file / class(es).
When I define a variable (like 'dummy' in the example below) and copy a value read from a...
Thanks for your offer, but it is not necessary to fix the code. I only need to mention this issue as a recommendation in a report. Therefore I needed a confirmation that this can indeed improve the written software (it already works, but quite slow). Thanks!...
Okay, but then you send a larger message in parts and after that you receive a message in parts. But what I want is to send a small message, receive an answer and then send a new message, receive an answer etc. I tried this but it doesn't work for me. I seems that the server closes that particular socket connection after 1 reply.
I've a quite simple question about socket programming (but I can't find the answer in widely available sources). Is it possible to 'reuse' a socket within 1 connection? In other words, is it possible to place 'send()' and 'recv()' in a loop in the code below? In that case time will be saved because the socket doesn't have to be opened and closed for every new buffer. The socket desciptor stays the same, the only thing that has...
I'm a student working on a report about a piece of software (C++, linux) that I've written. The major tasks that this software executes are:
>create a string based on called function (just a couple of integers converted to 'chars')
>open a thread (using pthread_create)
- main thread: start (deadlock) timer
- new thread: execute client functions for (wireless) communication (send string to server)...
I want to create a simple dialog based interface for a program in MS Visual Studio (6.0) . On startup, the user should enter his/her name in a 'edit control box'. Now I created a button that captures the name (CString) from that box, but when the user presses 'enter' instead of pressing the button, the interface shuts down. I also want to capture the string when the user presses 'enter'.
I guess I have to get used to the way of writing c++ (indeed, I have more experience with C). But I managed to find a reasonable solution to my problem based on the first solution of getValue() in ClassB. (Every class in the series calls the following by a function and parameters).
Thanks everybody!
One more question that has to do with memory allocation;...
By the way, the reason that I want direct access to ClassC is that it is a kind of database structure from where I want to pick attributes. It's a bit more complex than the given example, since there is also a ClassD (and maybe more).
If I use the 'getValue' function I would have the same problem with lowel level classes (that also have their attributes). So I'd rather want to use something like
Okay, I see the problem (thanks). I didn't see it immediately because I use a graphical environment (Rhapsody) where a lot of code is generated.
The problem isn't completely solved however, because the compiler doesn't know about the instance of ClassC when I call itsClassB->itsClassC[0]->getValue(); from ClassA:
it doesn't compile. When I use the following trick it does compile. I create an extra operation 'getValue' in ClassB. 'getValue' in ClassB returns itsClassC[0]->getValue();
So now I call from ClassA: itsClassB->getValue();
The (first) error message that is generated when I use itsClassB->itsClassC[0]->getValue(); directly is:
'itsClassC' : cannot access protected member declared in class 'ClassB'....
Leave a comment: