Ideas needed

I have to make a project for school. The objective is simple, It should have something to do with file handling.
I don't want to do something as simple as database management. On the other hand, we are not permitted to do anything involving export of foreign elements like graphics or fonts, etc.
Any ideas on how I can have fun with this thing? Some good project ideas?
Database management - simple? hehehe...

What about a component to store a program's messages in multiple languages?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class MessageManager
{
public:
    
    /**
     * Set the object to the message file
     */
    void load(const std::string& file_name); 

    /**
     * Set the required language to use
     */
    void set_language(const std::string& lang);

    /**
     * Retrieve a single message identified by key in the 
     * language configured by calling set_language()
     */
    std::string get_message(const std::string& key);

    /**
     * Return a list of languages available in the 
     * current message store, configured using
     * load().
     */
    std::vector<std::string> get_languages();
};

MessageManager mm;

int main()
{
    mm.load("program_messages.txt");
    mm.set_language("en"); // code for English

    std::cout << mm.get_message("welcome") << '\n'; // Program startup message

}
program_messages.txt

en:welcome:Welcome to ProgName
fr:welcome:Bienvenu a ProgName
sp:welcome:Bienvenido a ProgName


Last edited on
I like it. But I'll have to make it much more elaborate. Thanks though. Any others?
Well, if you think that database managment is simple I have something a little more complex (but not too complicated) in mind.

Take a file that contains a mish mash of contact information for a bunch of people, maybe even copy and paste the text from your schools contact page on their website, and sort through which entry is a name, phone number (typed in any format) or E mail address (Hint: Look for '@' as a deliminating character). Then sort each bit of data into it's own file, but do so that when a person goes to retrieve a name or phone number from the program it all comes back correctly.

Honestly I'm not sure I can type out what my idea is in a coherant matter at the moment and Galik gave you an A idea if you can pull it off. I just thought if your were looking for more input I'd throw that out there.
Topic archived. No new replies allowed.