0

Hello, it's been a while since I took my last programming class, and I must say I don't know how to do the following. I want to create a program that pulls data from a txt file and then lists that data. The data is simply C++ variable names, reserved words etc.The program should be able to pull any information from that text file. Just like this one:

class A {
int a[11],x,y,z;
char *oneString;
public:
A() { oneString= new char[100]; }
A() { delete oneString; }
void f();
};
void A::f() {
int temp;
x=y+1;
z=x+2; z= x*x;
}

It pulls the data and displays it.

Int
char
class


etc.

The input is just a regular text file where each line is terminated with an end-of-line character. I honestly have no idea how to do this. I thought about using arrays to get the info and display it. But would that array automatically process the info contained in the text file, since it's not just a list but classes that are being used in the input file?

Edited by XodoX: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by XodoX
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.