Hey,
I'm attemping to write a little UDP socket library in c++ on linux so a user can just create a new instance of a UDPSocket class, specify desination ip and port, and just connect. Then the...
Type: Posts; User: Opply
Hey,
I'm attemping to write a little UDP socket library in c++ on linux so a user can just create a new instance of a UDPSocket class, specify desination ip and port, and just connect. Then the...
in C you could do:
void print_it(string* details, int sizeOfArray)
{
for( int i=0; i<sizeOfArray; i++ )
{ cout << detailts[i] << endl;
}
}
One problem is with your while loop.
when you write:
while (os >> temporary)
std::cout << temporary << endl;
it is the same as:
If you want a bit more structure, you can do something like:
#include <iostream>
#include <string>
using namespace std;
int main()
I'm trying to write a multicast application on a linux computer with several network adapters.
To send multicast packets I rely on the operating systems routing tables, but to receive multicast...
Awesome, I rly liked that solution! :D
Cheers all!
This is ofc a way, but I would rather not add file access unless it is really needed.
I was thinking, is it not possible to override FILE in some way?
If I could change the function, I would, but it is a part of a bigger system and I am not allowed to modify it..
I've tried alot of stuff with the stringstream, some things even compile and does...
I am trying to use an old library I found that I am unable to modify.
The function I am trying to use takes in a FILE* as a parameter, and writes to this stream using the fprintf function.
...