Hi, I'm a C/C++ beginner and I can't get any API calls to run (I have previously used API with VB). Here is a sample code that won't work :
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL...
I have been trying for 3 weeks to find info I can use to: initialize, and read from a serial mouse in c, I have tried the source for GPM, libsvga, selection, allegro, and the linux drivers, the problem is that these files are made to support ALL kinds of mice, and I need to write code for just...
I have been trying for 3 weeks to find info I can use to: initialize, and read from a serial mouse in c, I have tried the source for GPM, libsvga, selection, allegro, and the linux drivers, the problem is that these files are made to support ALL kinds of mice, and I need to write code for just...
I need to know where to read in the data of the mouse, and where to write the init data for my PS2 mouse, the offests Im using seem to be almost right but the data is not reliable.
#include <stdio.h>
#include <math.h>
#include <sys/file.h>
#include <sys/mman.h>
#include <sys/types.h>
#include...
I got the lpt port to work, if anybody cares, heres some code.
#define LPT 0x0378
#define LCD_DATA_ADDRESS LPT+0
#define LCD_CONTROL_ADDRESS LPT+2
if ((ioperm (LPT, 3, 1)) == -1) {
printf ("init: failed\n");
} //set port to "ok i can write to...
is there some code for linux that is about the sme as this.
i know this wont work in linux, but i really need access to the rate and direction of the mouse.
i know some kind of open("/dev/mouse") may work, but i dont know how to code it.
i cant use ncurses, or alllegro,
#include...
is there some code for linux that is about the sme as this.
i know this wont work in linux, but i really need access to the rate and direction of the mouse.
i know some kind of open("/dev/mouse") may work, but i dont know how to code it.
i cant use ncurses, or alllegro,
#include...
is there some code for linux that is about the sme as this.
i know this wont work in linux, but i really need access to the rate and direction of the mouse.
i know some kind of open("/dev/mouse") may work, but i dont know how to code it.
i cant use ncurses, or alllegro,
#include...
Ok this code is just like the code before, but it shows the exact problem, it will compile fine, no errors, no warnings, but when it runs it just gets a "Segmentation Fault", and outputs nothing, but if I // remark out the qsort( funtion line, it compiles fine, and outputs perfectly...
Ok this code is just like the code before, but it shows the exact problem, it will compile fine, no errors, no warnings, but when it runs it just gets a "Segmentation Fault", and outputs nothing, but if I // remark out the qsort( funtion line, it compiles fine, and outputs perfectly...
Ok this code is just like the code before, but it shows the exact problem, it will compile fine, no errors, no warnings, but when it runs it just gets a "Segmentation Fault", and outputs nothing, but if I // remark out the qsort( funtion line, it compiles fine, and outputs perfectly...
I am very new to C and C+, and I am trying to teach myself from VERY outdated text books, and I can't seem to figure this out.
No matter what I do, the code below will either not compile with errors, or compile and then seg-fault when it hits the qsort function.
I have tried all changing the...
I am very new to C and C+, and I am trying to teach myself from VERY outdated text books, and I can't seem to figure this out.
No matter what I do, the code below will either not compile with errors, or compile and then seg-fault when it hits the qsort function.
I have tried all changing the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.