Last active
August 29, 2015 14:23
-
-
Save abinashmeher999/f493bd1e0d233b0c95cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void basic_args(const basic a, const basic_struct*** array, int *size) | |
| { | |
| std::vector<RCP<const Basic> > args; | |
| args = (*RCP_const_cast(a))->get_args(); | |
| *size = args.size(); | |
| *array = (const basic_struct**)malloc((*size)*sizeof(basic_struct*)); | |
| std::vector<RCP<const Basic>>::iterator it; | |
| int index = 0; | |
| for (it = args.begin(); it != args.end(); ++it) { | |
| (*array)[index++] = reinterpret_cast<const basic_struct*>(&(*it)); | |
| char *str; | |
| const basic_struct* b = (*array)[index-1]; | |
| str = basic_str(b); | |
| printf("%p\n",&((*array)[index-1])); | |
| // printf("%s ", str); | |
| // basic_str_free(str); | |
| } | |
| // printf("%p",(*array+1)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Returns an array of pointers to basic given by args | |
| void basic_args(const basic s, const basic_struct*** array, int *size); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment