Any C programmers wanna help convert code to convert between MIDI + CSV?
#20
(08-26-2022, 08:36 PM)TempodiBasic Wrote:  never seen this way to assign a value to a string variable  in C
  buf[p][0]="CDEFGAB"[(n+700000)%7];
That is a syntax error in C, perhaps not in C++. I've seen stranger things happen with C++ code, perhaps square-bracket operators were overloaded? Otherwise the intention of the programmer looks like one of the letters is being extracted.

Just doing buf[p][0]="CDEFGAB"; might not be allowed in C, must allocate memory for pointer for string "array", then more memory for each member of the array and then use "strcpy()" or something like that from "string.h". This is just my near-fundamental knowledge of that programming language...
Reply


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



Users browsing this thread: 43 Guest(s)