Lecture No. 01
Dated: 25-03-2025
Visual programming
is primarily event driven programming and its applications in
- Desktop
- Web
- Applications
#include <iostream>
#include <fstream>
int onKeyPress() {
char b = std::cin.get();
std::cout << b << std::endl;
return b == 'x';
}
Int onFileChanged() {
char a = f.get();
std::cout << a << std::endl;
return a == 'x';
}
int main () {
char a = '-', b;
do {
if (isKeyboardPressed()) {
if (onkeypress())
return 0;
}
std::ifstream f("test.txt", std::ifstream::in);
if (f.good() && a != f.peek()) {
if (onfilechanged()) return 0;
}
f.close();
} while (true);
return 0;
}