-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtinyqr.cpp
More file actions
28 lines (23 loc) · 735 Bytes
/
tinyqr.cpp
File metadata and controls
28 lines (23 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <Windows.h>
#include "qr.c"
int main()
{
printf(" ____ __ __ _ _ _ __ ____ \n");
printf("(_ _| | ( ( \\/ ) \\( _ \\\n");
printf(" )( )(/ /) ( O )) /\n");
printf(" (__)(__)_)__|__/ \\__\\|__\\_)\n");
printf("Enter text to encode: ");
char text[73]; // 73 characters + null terminator
// scanf til newline
scanf("%72[^\n]", text);
// let user choose output file
printf("Enter output file name (will be saved as bitmap): ");
char filename[256];
scanf("%255s", filename);
parseMessage(filename, text, 0);
printf("QR code saved to %s\n", filename);
printf("2951 b\n");
ExitProcess(0);
return 0;
}