title image


Smiley Re: bestimmtes Zeichen auslesen
Hi



Falls es um die Windows-Console geht...



#include <windows.h>

#include <stdlib.h>

#include <stdio.h>



char charAt(int x, int y) {

COORD coordScreen;

HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

DWORD cCharsRead;

char c;

coordScreen.X = x;

coordScreen.Y = y;

ReadConsoleOutputCharacter(hStdOut, &c, 1, coordScreen, &cCharsRead);

return c;

}





int main() {

printf("The char at 2,0 is ");

printf("'%c'\n", charAt(2,0));

system("PAUSE");

return 0;

}









bye



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: