title: Assigning a single line of user input into a multidimensional array in C / CH
body: <p>The problem I am having is I need to be able to store 2 values from a single line of user input into a single char array. The format will be "input1 input2" where the input1 is a string like 'C2' and input2 is an integer or double like '1.25' and the user will input these values with only a space to separate them.
  Example:</p>
  
  <pre><code>User Input
  C2 1.25
  </code></pre>
  
  <p>Another thing is I am using the Ch programming language which is a superset of C and a subset of C++. So far I am just learning that some C code does not work in my IDE (ChIDE). I haven't learned much c++ yet. Currently in the book I am reading I am now at the transition point between Ch and C / C++.</p>
  
  <p>So far I have tried a few lines of code, but my book doesn't have an example of scanning for multiple user inputted values in a single line and online I have found this fgets code that seems to work, but I can't make it work with a 2D array.</p>
  
  <pre><code>char userNoteName[15][15];
  //15 is arbitrary, ideally I want to use variables
  //and that the number of inputted values would be unknown.
  printf("Enter notes one at a time, in the format A#4 3,\n");
  printf("where the first string is the note, and the number\n");
  printf("that follows is the duration.\n");
  printf("Type Q when you are done entering notes.\n");
  fgets(userNoteName,15,stdin);
  printf("%s",userNoteName);
  </code></pre>
  
  <p>I have also tried using two arrays since I don't completely understand the fgets function, and I don't believe my project requires it since it isn't present in the book yet.</p>
  
  <p>Here is my original line of thinking.</p>
  
  <pre><code>char userNoteName[2][2];
  scanf("%s%s", &amp;userNoteName[0][0]);
  printf("%s\n", userNoteName);
  </code></pre>
  
  <p>Though this is wrong because the scanf isn't properly formatted. I think I need to find a better learning resource for coding. Even online I am struggling with finding something that resembles this idea.</p>