Skip to content

Instantly share code, notes, and snippets.

@renaudcerrato
Last active January 18, 2019 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renaudcerrato/d780803311adbe40b8706329d9d25bc9 to your computer and use it in GitHub Desktop.
Save renaudcerrato/d780803311adbe40b8706329d9d25bc9 to your computer and use it in GitHub Desktop.
Usage of typeOf
void foo(int *x) {
typeof(x) y; // Declares y with the type of x
typeof(*x) z; // Declare z with the type what x points to
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment