character array

Hi forum,

I have a character array defined as follows:

1
2
3
4
5
6
7
8
9
10
11
   static const char * fs_source[] =
      {
	 "#version 420 core                                                  \n"
	 "                                                                   \n"
	 "out vec4 color;                                                    \n"
	 "                                                                   \n"
	 "void main(void)                                                    \n"
	 "{                                                                  \n"
	 "    color = vec4(1.0);                                             \n"
	 "}                                                                  \n"
      };


Then we have another character array as follows:

1
2
3
4
5
6
7
  static const char *const *fs_sources[] =
      {
	 fs_source, //0
	 fs_source, //1
	 fs_source, //2
	 fs_source  //3
      };


Now i need to initialize a std::string with one of the contents of the fs_sources array. I cannot figure out how?

Any hint?


Thanks
you mean like : std::string str1( *fs_souces[ N ] );
Topic archived. No new replies allowed.