Type: Posts; User: Luis G
Search took 0.02 seconds.
Why not print in one portion of the screen and input in another?
Look for conio.h or ncurses.h, dunno if there's a C++ equivalent.
June 30th, 2006, 03:43 PM
I found out. The correct code is:
friend CMatriz<TG> operator+(const TG &op1,const CMatriz<TG> &op2); // objeto TG + CMatriz
friend CMatriz<TG> operator+(const double...
June 30th, 2006, 11:40 AM
Many thanks for the help, I've done what you said but it still gives the same errors.
This is how it looks now:
template<class TG> class CMatriz;
template<class TG> ostream& operator<<...
June 29th, 2006, 06:20 PM
For the record, I solved the ostream << problem by adding:
template<class TG> class CMatriz;
template<class TG> ostream& operator<< (ostream & os, const CMatriz<TG> &op);
June 29th, 2006, 05:19 PM
First of all, this code does compile with g++ 3.3.5. But with g++ 4.0.2 it gives me a few errors. g++ enters the #else portion. The _MSC_VER is meant to be able to compile it in VC++ 5
September 22nd, 2005, 02:54 PM
This guy presents a technical report and gives C++ code for a file compressor using arithmetic coding and an adaptive order-0 model
I know you're searching for C...
September 21st, 2005, 06:33 PM
So basically I want to do the following operations:
September 21st, 2005, 05:43 PM
Too bad there's no way (or easy way) to keep the natural syntax I want and make it efficient.
I was thinking I should implement those operators just as you suggested.
Thanks again for the...
September 21st, 2005, 05:20 PM
Thanks for the quick reply.
I'm researching as to how to do a copy constructor, it's been a while since I did some basic programming in C++ and I don't remember ever coming into that.
To make it...
September 21st, 2005, 04:45 PM
The template declaration:
template<class TG> class CMatriz
CMatriz(unsigned int j,unsigned int k=1);
void inserta(unsigned int j,unsigned int...
April 30th, 2003, 01:08 PM
I've heard of an undelete tool for Linux, try searching freshmeat.net
April 30th, 2003, 01:06 PM
Research about semaphores.
I've used them with parent and child process, not sure about their behaviour with threads.
semget(), semctl() and semfree() (not sure about the last one)
April 30th, 2003, 02:22 AM
Ohh i found the error, i should not use "Connect()" method, i guess it should just be used for SOCK_STREAM.
I'm using CAsyncSocket btw :D
A bit of background of the program i'm doing:
April 29th, 2003, 11:43 PM
I was about to post the same question.
I've done Create and Connect on both ends, but SendTo and ReceiveFrom, seem to not work.
Well, i'm doing the ReceiveFrom in the OnReceive() function, if i...
April 29th, 2003, 03:50 PM
If the other peer is receiving the packets, then we have two possibilities:
- The other peer is not sending a response, firewalls tend to ignore incoming ICMP packets.
- You are not receiving...
April 29th, 2003, 03:44 PM
Homework, huh? :D
Visual C++ as well as many other compilers have debugging tools, why don't you insert breakpoints or run it step by step so you can find what the problem is?
If you did a good...
April 25th, 2003, 05:58 PM
ok, i might not tell the right answer, but just a small thought i had when i saw the coordinates.
why don't you change them to
April 25th, 2003, 04:48 PM
ow, i was thinking something like "receive from", or force the assigning of a "well known" port to the connections.
April 25th, 2003, 03:17 PM
Is there a way to make a socket connection (TCP) between to peers without using a listen port?
Right now i'm using CAsyncSocket, but i could change that.
Thanks in advance.
April 24th, 2003, 01:39 PM
that code should work.
Just for the sake of it, try this piece of C code
April 22nd, 2003, 01:21 PM
I should have been more clear, 'cause "that looks like C to me" is a little vague, I should have said, that is C code.
You'd be surprised by the ammount of books and teachers that confuse C with...
April 22nd, 2003, 01:06 PM
i'm definitively not a big fan of C++, but i can tell you that you're not programming in C++, that looks like C to me.
April 22nd, 2003, 12:54 PM
Eli Gassert, those are not raw sockets. Proof:
sListen = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
SOCK_STREAM is TCP.
As far as i know there was no way to programm true raw sockets in...
April 22nd, 2003, 12:47 PM
You could try to open each port, on ports already in use the listen function should return an error code.
Other way would be to manually attempt connections to 127.0.0.1 (localhost) at port X, if...
April 21st, 2003, 04:23 PM
Thanks a lot, right now i'm reading other questions of that FAQ, a couple of tests using that approach reduced the cpu utilization to 15% (instead of 100%), and most of that 15% is used by prog2.
Click Here to Expand Forum to Full Width