Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tasten

Empfohlene Antworten

hi ich hab n kleines programm geschrieben zu dem ich ne frage hab

#include <conio.h>

#include <stdio.h>

int main()

{

unsigned char Tastaturzeichen, Funktionstaste;

do {

Funktionstaste=0;

Tastaturzeichen = getch();

if ( Tastaturzeichen==0x00)

{

Tastaturzeichen=0;

Funktionstaste = getch();

}

putch(Tastaturzeichen);

} while (Tastaturzeichen != 13);

return 0;

}

und zwar ich möchte jetzt auch so machen, dass beim drücken von links bzw rechts, die momentane cursorposition wandert (mit gotoxy). jedoch krieg ich als rückgabewert irgendetwas zurück (beim drücken auf links oder rechts).

Wie bekomme ich das weg? bzw. dass ich dann ...

if (Funktionstaste==0x4D){gotoxy(x+1,y) }..

???

hallo alxv2010

versuchs mal so:


#include "stdafx.h"

#include "conio.h"

#include "windows.h"


int main() {

    POINT lp;

    while(1) {

        if(kbhit() && (getch() == 75)) {        // links

            GetCursorPos(&lp);

            SetCursorPos(lp.x-1, lp.y);

        }

        if(kbhit() && (getch() == 77)) {        // rechts

            GetCursorPos(&lp);

            SetCursorPos(lp.x+1, lp.y);

        }

    }

    return 0;

}

Gruss

Neo336

Bearbeitet von neo336
Fehler im code

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.