I do not want to use any print functions as I am working on my own OS. So I am trying to solve this without exterior functions. However if there is a function I need to create, then that's what I gotta do. If I knew what I needed to do.
The standard :
Code: Select all
char j;
int a = 1;
j = (char)a;
type 'char *' ). So I am confused. OR I just don't know how to add a "byte" to a string. Which I thought was an array once I setup the array length. Which in this case is 80 bytes. I am fairly knowledgeable with C.. but... apparently not enough.
Code: Select all
#define MAX_STRING_LEN 80
void main(void)
{
char STRI[MAX_STRING_LEN];
char j[] = "The number is : ";
int a = 1;
STRI = j, (char *)a;
// STRI should Equal ----> "The number is : 1"
}
My C compiler is GCC -DJGPP 4.7.2.