One can use the IT++ library: http://itpp.sourceforge.net
This code is actually cross-platform because IT++ is cross-platform.
//Code licensed under the GPLv2
//Update: I have tested the following code. It works. Note that the binary string below must not have spaces or endlines(of course, your text editor will word-wrap the content–that is fine).
//However, the usual disclaimers in GPLv2 apply to this code.
PAM p(4); //We want 4-PAM
vec output; //modulated thing
bvec input = “0100100001100101011011000
//Binary representation of Hello World!
//The following line of code simulates the transmitter end.
//In a realistic simulation, we would have code to add pulse shaping and noise where this comment is
//The following simulates the receiver end.
if(input == demodded_out)
cout<<“Big Bad World”<<endl;