Created
August 14, 2012 02:36
-
-
Save iKlsR/3345863 to your computer and use it in GitHub Desktop.
errrrr
This file contains 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
#include "iostream" | |
#include <stdlib.h> | |
#include <stdio.h> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
long long unsigned int * ptr = new long long unsigned int; /* modern */ | |
*ptr = 120; | |
cout << * ptr << endl; | |
delete(ptr); | |
unsigned int * x = (unsigned int *)malloc(sizeof(unsigned int)); /* old */ | |
*x = 121; | |
fprintf(stdout, "%d\n", *x); | |
free(x); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment