title: conversion from to non-scalar type requested
body: <p>im new to c++ programming, however I have done some programming in java, so I am not completely new to OO programming.</p>
  
  <p>What I am trying to do is create structure, and then an array of objects of that structure. I am trying to keep that array always sorted (using newbie sorting), so what I do is define the structure and then create an array[50] of that structure, and helping variable of that structure. Then every new entry of different variables (name, last name, grades, etc..) I get from the user I put into helper variable. Then, when user finishes typing all the data in helper variable, i go on and figure out at what position in the array should that object be put.</p>
  
  <p>Here is sample code, ill try to keep it as simple as possible.</p>
  
  <pre><code>struct student {
      //declaring variables that student should have
  };
  
  student students[50];
  int numOfStud=0;
  
  while (a=='y' &amp;&amp; numofStud&lt;50) { //a=='y' just means user wants to add more students
      student input= new student;
              //adding various data to student     
              //adding input into an array of students using variation of insertion sort algorithm
  cout &lt;&lt; "want to add more students?";
  cin &gt;&gt; a;
  }
  </code></pre>
  
  <p>When i try to compile this i am getting errors at <code>student input= new student</code>. So I am a bit confused now.</p>
  
  <p>Off topic: Also I have a question about what happens when you do for example <code>students[0]=input;</code> am i creating another copy of object here, or am I just creating another pointer (like in java), and therefore both students[0] and input will point at the same object?</p>
  
  <p>Thanks for your help guys!</p>