I'm goin to be constructing a binary tree based on a binary.dat file in the form of 1(2,3(10)),4(5(8),6(9),7) which would read like left subtree of a node being in parenthases following the node key and the right subtree following sperated by a comma.
Question is how should i read in the file? I can assume only integer input, but i only know how to read a file with getchar. So suggestions as to how to handle this is requested. just add the ascii values? isn't that gheto??