1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accessing usb using c++

Discussion in 'C++' started by Andres, Oct 13, 2008.

  1. Andres

    Andres New Member

    Joined:
    Jul 22, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    Lets say that there is a device connected to one of the usb ports in my computer. That device is sending numbers to my computer. I want to create a program that can access the usb port and collect the data from it. I have this code and got stuck here...can someone please help me?

    #include <stdio.h>
    #include <iostream>
    using namespace std;

    int main ()
    {
    FILE * pFile;
    pFile = fopen("f:\\[/b]", "r");
    system("pause");
    fclose(pFile);
    return 0;
    }
     

Share This Page