1 #include <stdio.h>
2 #include <vector>
3 #include <string>
4 
5 struct struct_for_copying
6 {
struct_for_copyingstruct_for_copying7     struct_for_copying (int in_int, double in_double, const char *in_string) :
8         int_value(in_int),
9         double_value(in_double),
10         string_value (in_string)
11     {
12 
13     }
struct_for_copyingstruct_for_copying14     struct_for_copying()
15     {
16         struct_for_copying (0, 0, "");
17     }
18 
19     int int_value;
20     double double_value;
21     std::string string_value;
22 };
23 
main(int argc,char ** argv)24 int main (int argc, char **argv)
25 {
26     struct_for_copying input_struct (150 * argc, 10.0 * argc, argv[0]);
27     struct_for_copying output_struct;
28     int some_int = 44;
29     double some_double = 34.5;
30     double other_double;
31     size_t vector_size;
32     std::vector<struct_for_copying> my_vector;
33 
34     printf ("Here is some code to stop at originally.  Got: %d, %p.\n", argc, argv);
35     output_struct = input_struct;
36     other_double = (some_double * some_int)/((double) argc);
37     other_double = other_double > 0 ? some_double/other_double : some_double > 0 ? other_double/some_double : 10.0;
38     my_vector.push_back (input_struct);
39     vector_size = my_vector.size();
40 
41 	return vector_size == 0 ? 0 : 1;
42 }
43