I have a c++ application and I want to send this information to the arduino through serial port. Can someone plese tell me how to do this in C++? I really need to send an integer to the arduino. Thanks in advance!
Use fopen, with the serial port name as the file-name. Then just read-from/write-to the 'file' handle that you got from fopen. Under windows, the com port name is COM1 ... COM9 for the first 9. For COM10 and above, you need to insert a bunch of slashes and a dot, e.g "\\.\COM15"
Under *nix, you'll need to fopen a device called something like "/dev/ttyACM0"
Just look for Serial port reading/writing tutorials.
Start by trying to fopen/CreateFile the serial port your Arduino is connected to. Read from the file handle. If any data is returned, print it to screen. Continue trying to read/print data until the user cancels the application.
Any sketch that prints something to the serial port would be suitable to run while you try to get data from the Arduino.