[ create a new paste ] login | about

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

pritee4584 - C++, pasted on Feb 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include<string>

int main()
{
   //int b = 10;
   int *p = 10; //&b;
   //*p = 10;
   //p = func();
  // p++;
   cout<<p<<endl;
   cout<<*p<<endl;
   cout<<&p<<endl;
   return 1;
}


Output:
1
2
3
In function 'int main()':
Line 7: error: invalid conversion from 'int' to 'int*'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: