A window(general protection exception) pops up when I try to compile this:
The notepad file(in the same directory) says this:Code://Filename: ptch.cpp //Fuction: Patch Testing #include <fstream.h> #include <conio.h> #include <string.h> #include <stdio.h> int main(void) { char *p; char input[100]; ifstream b_file("patch.txt"); b_file >> input; b_file.close(); int lp=1; while(lp!=0) { char nl[]="\n"; strcpy(p,nl); lp=lp-1; } p = strtok(input, "2"); if(p) cout << p; clrscr(); p = strtok(NULL, "2"); cout << p; getch(); }
What's wrong?Code:A1Star M2Wars



LinkBack URL
About LinkBacks


