data_structures
data2ptr.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* to_pointer.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2020/07/19 01:52:26 by unite #+# #+# */
10 /* Updated: 2020/07/19 01:53:33 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "utils.h"
15 
16 int *int2ptr(int a)
17 {
18  static int i;
19 
20  i = a;
21  return (&i);
22 }
23 
24 char *char2ptr(char a)
25 {
26  static char i;
27 
28  i = a;
29  return (&i);
30 }
31 
32 float *float2ptr(float a)
33 {
34  static float i;
35 
36  i = a;
37  return (&i);
38 }
int2ptr
int * int2ptr(int a)
Converts int to int*
Definition: data2ptr.c:16
utils.h
char2ptr
char * char2ptr(char a)
Converts char to char*
Definition: data2ptr.c:24
float2ptr
float * float2ptr(float a)
Converts float to float*
Definition: data2ptr.c:32