[ create a new paste ] login | about

Link: http://codepad.org/F8a31hV2    [ raw code | output | fork ]

C++, pasted on Aug 16:
1
2
3
4
5
6
7
8
int main(void) {
  char* ar1 = "Hello";
  char ar2[] = "HEllo";

  char* arr3[] = {"Cat", "Bag", "Kas", "Zzd"};
  char** ar4 = {"Cat", "Bag", "Kas", "Zzd"};
  return 0;
}


Output:
1
2
3
4
5
6
7
8
9
cc1plus: warnings being treated as errors
In function 'int main()':
Line 2: warning: deprecated conversion from string constant to 'char*''
Line 5: warning: deprecated conversion from string constant to 'char*''
Line 5: warning: deprecated conversion from string constant to 'char*''
Line 5: warning: deprecated conversion from string constant to 'char*''
Line 5: warning: deprecated conversion from string constant to 'char*''
Line 6: error: scalar object 'ar4' requires one element in initializer
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: