Write your question here.
I am a newbie. I am trying to learn how to program. I have read some books but I am still lost. A little direction or help is much appreciated!
I am looking to code a simple program that will ask for a user to input a UDP port number to listen on, open that port, copy what is received into a variable, and then print that variable to the screen. I do not know where to start with the port code.
// What library should I include?
#include <stdio.h>
#include <iostream.h>
int main()
int udpPort;
string udpVariable;
//Ask for the port number
cout << "Enter the UDP port to listen on: ";
cin >> udpPort;
// Open the udpPort
This is where I am lost!
// Listen to the udp port and copy what you hear into a variable
cin >> udpVariable;
// Output what was heard to the screen
cout << udpVariable;
After doing some searching I have found a number of c++ networking libraries. Should I just use the boost libraries or does anyone have a recommendation?
I have also found the forum threads about adding a library. Seems like greek to me but I am going to give it a shot!