I am trying to make a function in C that will print a string taken as a parameter. Is this even possible in C?
I have something like this in my header file, but string is not a valid identifier. I understand there are no strings in C, but what's the string.h class for?
#include <string.h>
#ifndef _NEWMAIN_H
#define _NEWMAIN_H
#ifdef __cplusplus
extern "C" {
#endif
void print (string message){ //this is where i need help
printf("%s", message);
}
#ifdef __cplusplus
}
#endif
#endif /* _NEWMAIN_H */