Last active
March 14, 2019 10:51
-
-
Save kateolenya/6f81be3ee67bb7f884604267c91b8e01 to your computer and use it in GitHub Desktop.
Private variables in struct in C
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 "private_var.h" | |
#include <stdio.h> | |
int main() | |
{ | |
struct Contact * Tony; | |
Tony = create_contact(); | |
// printf( "Mobile number: %d\n", Tony->mobile_number); | |
// will cause compile time error | |
delete_contact( Tony ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment