Re: verilog & C++
If you're using VCS, then you can use the DirectC Interface.
From VCS Manual:
DirectC Interface — significantly improves ease-of-use and performance over existing PLI-based methods by allowing you to directly embed user-created C/C++ functions within your Verilog design description. VCS atomically recognizes C/C++ function calls and integrates them for simulation, thus eliminating the need to manually create PLI files. DirectC also eliminates the debugging and by bypassing PLI overhead, increases performance for simulating C/C++ code with Verilog. For details, see the VCS DirectC User Guide.