Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- char cmd;
- void exec(char cmd, FILE *fp);
- int main() {
- FILE *fp;
- fp = fopen("test.txt", "r");
- while((cmd=getc(fp))!=EOF) {
- exec(cmd,fp);
- };
- fclose(fp);
- }
- void exec(char cmd, FILE *fp)
- {
- if(cmd=='>') {
- cout << "Pointer" << endl;
- getchar();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement