Thread: Mouse input

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    4

    Mouse input

    Don't ask me why but i want to take input from my usb mouse then record the position of the mouse on the y axis(vertical) then plot it on a line graph. How would i get input from a mouse, record the data per increment in time, then plot it on a graph something resembling sound waves on audacity?

    Code so Far I literally made this 5 minutes ago and I still need to work out the flow. (warning i'm a n00b):

    Code:
    #include <iostream>
    
    
    using namespace std;
    
    
    void main(){
        cout << "press enter to start";
    
    
        cin.get();
    
    
        mouse_in (void);
    }
    
    
    int mouse_in [1024](){
        
    
    
        char 'end';
        int graph = 0;
        for (int range;cin >> 'end';graph++)
            range = usb_in.yaxis
    
    
    return mouse
    }
    
    
    int usb_in(){
        
        return yaxis
    }
    Last edited by wazzupyall; 01-15-2012 at 07:41 PM.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Tons of syntax errors, and main returns void instead of int.
    Get yourself a basic grasp of C++ first, then choose an operating system to develop for. You are going to need platform-dependent API.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    4
    Ok whatever. Forums obviously isn't good for help on a project just answer questions and leave.

  4. #4
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by wazzupyall View Post
    Ok whatever. Forums obviously isn't good for help on a project just answer questions and leave.
    You haven't given enough information. We don't even know what OS you're using.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Do not be an idiot. You must learn how to use a chainsaw before cutting down a tree with it. A child must learn to walk before learning how to run. Otherwise there will only be grief and danger. I am telling you this for a reason.

  6. #6
    Registered User
    Join Date
    Jan 2012
    Posts
    4
    Here's a better question. Is there a good flexible library that can make a graph in c++?

    And my OS is windows 7 64 bit on an ASUS G73jh with core i7 1.6ghz.
    If I was an expert already do you think I'd be on the forums asking for help?
    I never said I took the time to write good code I just wrote a scribble to start off with.
    When I know how to plot data on a graph then I have to figure out how to get time and mouse input.
    Last edited by wazzupyall; 01-23-2012 at 08:08 PM.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Here is a better question. Have you learned the language yet?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mouse Input
    By Knox in forum C Programming
    Replies: 3
    Last Post: 03-02-2006, 01:33 AM
  2. Mouse Input
    By bumfluff in forum C++ Programming
    Replies: 7
    Last Post: 11-11-2005, 01:23 AM
  3. Mouse Input
    By DeepFyre in forum C++ Programming
    Replies: 5
    Last Post: 10-17-2004, 08:19 AM
  4. Mouse Input
    By gvector1 in forum C Programming
    Replies: 7
    Last Post: 10-01-2003, 10:27 AM
  5. Mouse Input????
    By Brandon in forum Game Programming
    Replies: 1
    Last Post: 11-11-2001, 10:04 AM