Crtique my program, am I storing configuration and language data the best way possible?

I'm attempting to write a multi language program that loads the language configuration from a file and then loads the language info from a resource file. I'm very unsure of whether or not what I'm doing is the best way of doing this. I've searchd the almighty Google for best practices but the articles I've found haven't completely answered my question. The best answer that I got was to write a simple parser for the config file and to store the settings in an object, which sounds pretty good in theory. I've also decided to read the resource file line by line and store the messages in strings that are declared in an object, but I'm wondering if that's not following the kiss and dry principles as closely as I'd like it to. I'd just like some constructive criticism. What do you think so far?

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
Main function does bootstrapping. Loads config data and parses the arguments.

*/

#include<cstdlib>
#include<cstdio>
#include<cstring>

const char* VERSION = "X.X.X.X";

class config
	{
	public:
	char language[8] = "en";
	char langpath[512] = "~/.corrupt/lang/";
	};

class message
	{
	public:
	char unknown_switch[64] = "Unknown switch: %s\n";
	char help_msg[1024] = "help_msg.exe\n";
	};

int main(int argc, char* argv[])
	{
	message msg;
	//_bootstrap();
	if(argc == 1)
		{
		printf(msg.help_msg);
		return 0;
		}
	int loop;
	for(loop = 1;loop != argc;loop++)
		{
		if(
		(strcmp(argv[loop],"-h\0") == 0) or
		(strcmp(argv[loop],"/h\0") == 0) or
		(strcmp(argv[loop],"--help\0") == 0))
			(printf(msg.help_msg));
		else if(
		(strcmp(argv[loop],"-v\0") == 0) or
		(strcmp(argv[loop],"/v\0") == 0) or
		(strcmp(argv[loop],"--version\0") == 0))
			(printf("%s%s",VERSION,"\n"));
		else if(
		(strcmp(argv[loop],"-e\0") == 0) or
		(strcmp(argv[loop],"/e\0") == 0) or
		(strcmp(argv[loop],"--execute\0") == 0))
			{
			loop++;
			system(argv[loop]);
			}
		else{printf(msg.unknown_switch,argv[loop]);return 1;}
		}
	}
Why do you end ever string literal that you pass to strcmp() with \0? The following is true:
strcmp("foo\0", "foo") == 0
Because
"foo\0" -> {'f', 'o', 'o', 0, 0}
"foo" -> {'f', 'o', 'o', 0}
Ah, okay. It was just a silly misconception I had.
Topic archived. No new replies allowed.