Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <conio.h>
- using namespace std;
- int main() {
- string barcode;
- string key;
- int cha;
- int count = 1;
- char c;
- cout << "Scan... mit LEER Beenden" << '\n';
- do
- {
- c = getch();
- if (c=='#')
- {
- do
- {
- c=getch();
- if (c!='*')
- {
- key=c;
- barcode.append(key);
- }
- }
- while (c!='*');
- ofstream myOutPutFile("scan.ini", ofstream::app);
- cout << count << '=' << barcode << '\n';
- myOutPutFile << count << '=' << barcode << '\n';
- count++;
- myOutPutFile.close();
- barcode="";
- }
- cha=c;
- }
- while (cha!=32);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement