Any C programmers wanna help convert code to convert between MIDI + CSV?
#25
(08-27-2022, 11:22 PM)TempodiBasic Wrote: :
char s;
s = "ABCD"[1];
printf (%c,s);

and

char s;
s = 'A';
printf (%c, s);


they do the same thing.
:
The "printf()" line should be:
Code: (Select All)
printf("%c", s);
This is in case you or somebody else is learning how to program in C, to clear up confusion. "printf()" expects at least one parameter which is the format, which is a pointer to a variable of type "char". It could be a string literal in double-quotation marks in this case.

Otherwise you could have seen what @JRace did in an earlier post and used instead:
Code: (Select All)
putchar(s);
Reply


Messages In This Thread
RE: Any C programmers wanna help convert code to convert between MIDI + CSV? - by mnrvovrfc - 08-28-2022, 06:06 PM



Users browsing this thread: 45 Guest(s)