ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi,
I am writing an application that reads a text file and reads each line in a different string, then that program should read that string and load the class that has exactly the name that is contained in the string(the class always exists). Now my problem is that i need to find a way to load the class, whose name equals to the string contents, automatically and without and other condition like the switch case conditions or else if conditions which are lenghty and which can create problems when the text file becomes really long.
Hi,
I am writing an application that reads a text file and reads each line in a different string, then that program should read that string and load the class that has exactly the name that is contained in the string(the class always exists).
That's easy.
Quote:
Now my problem is that i need to find a way to load the class, whose name equals to the string contents, automatically and without and other condition like the switch case conditions or else if conditions which are lenghty and which can create problems when the text file becomes really long.
Any one can help?????
is this your homework ?
Can you elaborate about why writing structured programs create problems ?
Thanks for replying! Well i am trying to generate a menu out of the text file and i wanted to know how to load the classes out of the text(String) from the text file.
If its easy then you will surely be able to help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.