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.

Empfohlene Antworten

Veröffentlicht

Hi,

ich hab folgendes Programm um etwas von einem Magnetkartenleser über den Com-Port zu lesen. Komischerweise funktioniert das nur wenn ich vorher mit dem Hyperterminal von Windows etwas von dem Port gelesen.


#include <iostream>
#include <fstream>
#include <windows.h>

using namespace std;

int main()
{
system("mode com2: baud=9600 PARITY=n Data=8 Stop=1 to=on xon=off \ odsr=off octs=on dtr=on rts=hs idsr=off");
//system("mode com2:9600,N,8,1,R");
Sleep(1000);
fstream porti("COM2:", ios::in | ios::binary);
if (!porti.is_open())
cout << "fehler";
else
{
char t;
while(!porti.eof())
{
porti>>t;
if (t!= -52)
cout<<t;
}
porti.close();

}
return 0;
}
[/PHP]

Die Einstellungen die vom Hyperterminal gemacht werden, sind die selben die ich per mode setze. Trotzdem scheint HyperTerminal noch irgend etwas anderes zu machen.

Hat einer ne Idee?

Gruß

Guybrush

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.